https://sourceforge.net/p/sdcc/bugs/4153/ Index: src/mcs51/ralloc.c =================================================================== --- src/mcs51/ralloc.c (revision 17011) +++ src/mcs51/ralloc.c (working copy) @@ -1208,7 +1208,7 @@ int change = 0; /* if the result has been spilt then cannot share */ - if (opsym->isspilt) + if (result->isspilt || opsym->isspilt) return 0; for (;;)