Fixed some BITFIELD related problems
authorsandeep <sandeep@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Mon, 13 Nov 2000 22:26:47 +0000 (22:26 +0000)
committersandeep <sandeep@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Mon, 13 Nov 2000 22:26:47 +0000 (22:26 +0000)
git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@498 4a8a32a2-be11-0410-ad9d-d568d2c75423

src/SDCCast.c
src/SDCCcse.c
src/SDCCsymt.c

index 788187d52f82b15eb6b0daeb882b9368b9504968..cc5aff3fbf127e41889a16468c7066b5f2f6c6c3 100644 (file)
@@ -1558,6 +1558,10 @@ ast *decorateType (ast *tree)
            
            /* otherwise just copy the type information */
            COPYTYPE(TTYPE(tree),TETYPE(tree),tree->opval.val->type);
+           if (funcInChain(tree->opval.val->type)) {
+                   tree->hasVargs = tree->opval.val->sym->hasVargs;
+                   tree->args = copyValueChain(tree->opval.val->sym->args) ;
+           }
            return tree ;
        }
        
index 3d1a234d954cc72d9bfceb00902d34b0962098f7..f0859751141166730d13a55c8646bbe59ae76b32 100644 (file)
@@ -1295,7 +1295,8 @@ int cseBBlock ( eBBlock *ebb, int computeOnly,
            /* update the spill location for this */
            updateSpillLocation (ic);
 
-           if (POINTER_SET(ic)) {
+           if (POINTER_SET(ic) &&
+               !(IS_BITFIELD(OP_SYMBOL(IC_RESULT(ic))->etype))) {
                pdop = NULL ;
                applyToSetFTrue (cseSet,findCheaperOp,IC_RESULT(ic),&pdop);
                if (pdop && IS_ITEMP(pdop) && !computeOnly)                 
index 5328494186a9fc2900a7bdd666d3b3c7366758e7..e2780d51550126e8f7a5453aedd68f439f6763b2 100644 (file)
@@ -856,8 +856,6 @@ int   compStructSize (int su, structdef  *sdef )
            else  /* does not fit */
                {
                    bitOffset = 0 ;
-                   loop->offset++;   /* go to the next byte  */
-                   sum++         ;
                    SPEC_BSTR(loop->etype) = bitOffset   ;
                    sum += (loop->bitVar / 8)  ;
                    bitOffset += (loop->bitVar % 8);