Fix for bug #469649 . When we make a register equivalent carry over the fact
authorsandeep <sandeep@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Sat, 27 Oct 2001 19:34:49 +0000 (19:34 +0000)
committersandeep <sandeep@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Sat, 27 Oct 2001 19:34:49 +0000 (19:34 +0000)
that it can go on stack.

git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@1454 4a8a32a2-be11-0410-ad9d-d568d2c75423

src/SDCCicode.c

index 0ccc0023e91f7b4bd99118c31a2d83dd51a5921e..8506e9b6540c6f0d6a534d8ef21a5b26dd360524 100644 (file)
@@ -1276,7 +1276,6 @@ operandFromSymbol (symbol * sym)
       sym->level &&            /* is a local variable */
       !sym->addrtaken &&       /* whose address has not been taken */
       !sym->reqv &&            /* does not already have a reg equivalence */
-      !sym->onStack &&          /* jwk: not on stack */
       !IS_VOLATILE (sym->etype) &&     /* not declared as volatile */
       !IS_STATIC (sym->etype) &&       /* and not declared static  */
       !sym->islbl &&           /* not a label */
@@ -1292,6 +1291,7 @@ operandFromSymbol (symbol * sym)
       OP_SYMBOL (sym->reqv)->key = sym->key;
       OP_SYMBOL (sym->reqv)->isreqv = 1;
       OP_SYMBOL (sym->reqv)->islocal = 1;
+      OP_SYMBOL (sym->reqv)->onStack = sym->onStack;
       SPIL_LOC (sym->reqv) = sym;
     }