* Fixed r44145. To test if a constant is declared it is needed to use {$if declared()} instead of {$if defined()}.

git-svn-id: trunk@48389 -
This commit is contained in:
yury 2021-01-24 13:32:11 +00:00
parent 402876bc1f
commit 31cd3df783

View File

@ -1720,11 +1720,9 @@ unit rgobj;
{ while compiling the compiler. }
tmpr:=NR_STACK_POINTER_REG;
{ e.g. AVR does not have a stack pointer register }
{$if defined(RS_STACK_POINTER_REG)}
{$if (RS_STACK_POINTER_REG<>RS_INVALID)}
{$if declared(RS_STACK_POINTER_REG) and (RS_STACK_POINTER_REG<>RS_INVALID)}
if (regtype=getregtype(tmpr)) then
include(adj_colours,RS_STACK_POINTER_REG);
{$ifend}
{$ifend}
{Assume a spill by default...}
found:=false;