* src/hc08/gen.c (hc08_emitDebuggerSymbol),
[fw/sdcc] / src / SDCCcse.c
index 1466760c72dc7b058d4fc612e4cbeb1008649b9e..c57509201370e3d868ad059ec95cfe12ba7293a5 100644 (file)
@@ -1296,10 +1296,13 @@ updateSpillLocation (iCode * ic, int induction)
                        if (!OP_SYMBOL(IC_RIGHT (ic))->noSpilLoc &&
                            !IS_VOLATILE (setype) &&
                            !IN_FARSPACE (SPEC_OCLS (setype)) &&
-                           !OTHERS_PARM (OP_SYMBOL (IC_RESULT (ic))))
+                           !OTHERS_PARM (OP_SYMBOL (IC_RESULT (ic)))) {
 
                                SPIL_LOC (IC_RIGHT (ic)) =
                                        SPIL_LOC (IC_RESULT (ic));
+                               OP_SYMBOL (IC_RIGHT (ic))->prereqv =
+                                       OP_SYMBOL (IC_RESULT (ic))->prereqv;
+                       }
                }
                /* special case for inductions */
                if (induction && 
@@ -1307,6 +1310,8 @@ updateSpillLocation (iCode * ic, int induction)
                    !OP_SYMBOL(IC_RESULT (ic))->noSpilLoc &&
                    !SPIL_LOC(IC_RESULT(ic))) {
                        SPIL_LOC (IC_RESULT (ic)) = SPIL_LOC (IC_RIGHT (ic));
+                       OP_SYMBOL (IC_RESULT (ic))->prereqv =
+                               OP_SYMBOL (IC_RIGHT (ic))->prereqv;
                }
        }
 }