src/mcs51/ralloc.c (packRegsForAssign): fixed bug #703541
authorbernhardheld <bernhardheld@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Sat, 15 Mar 2003 22:52:01 +0000 (22:52 +0000)
committerbernhardheld <bernhardheld@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Sat, 15 Mar 2003 22:52:01 +0000 (22:52 +0000)
git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@2392 4a8a32a2-be11-0410-ad9d-d568d2c75423

ChangeLog
src/mcs51/ralloc.c

index 6f2060ab9e4d11f53ab664e2608379fb02a2500b..17a5845a2b25d3322961cacd4cce0c41004658f0 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2003-03-15  Bernhard Held <bernhard@bernhardheld.de>
+
+       * src/mcs51/ralloc.c (packRegsForAssign): fixed bug #703541
+
 2003-03-13    <johan@balder>
 
        Hackup const and volatile modifiers in type chains a bit:
index 8ecb55b395dfe6ac39580dbaa781a79f84650fd4..0723d9e9e5bb7ea33ac58abd775af7162782e8e9 100644 (file)
@@ -1841,7 +1841,12 @@ packRegsForAssign (iCode * ic, eBBlock * ebp)
     {
       sym_link *etype = operandType (IC_RIGHT (dic));
       if (IS_BITFIELD (etype))
-       return 0;
+        {
+          /* if result is a bit too then it's ok */
+         etype = operandType (IC_RESULT (dic));
+          if (!IS_BITFIELD (etype))
+           return 0;
+       }
     }
   /* if the result is on stack or iaccess then it must be
      the same atleast one of the operands */