This _could_ be a fix for the everlasting --stack-auto compiler crash
authorjohanknol <johanknol@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Tue, 21 Aug 2001 16:23:18 +0000 (16:23 +0000)
committerjohanknol <johanknol@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Tue, 21 Aug 2001 16:23:18 +0000 (16:23 +0000)
git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@1161 4a8a32a2-be11-0410-ad9d-d568d2c75423

src/mcs51/gen.c

index 408e9116539f02c000119a7ad33737b2b91057b4..54e57f6047610a85676758c868b16e1da520a960 100644 (file)
@@ -239,7 +239,7 @@ endOfWorld:
   /* other wise this is true end of the world */
   werror (E_INTERNAL_ERROR, __FILE__, __LINE__,
          "getFreePtr should never reach here");
-  exit (0);
+  exit (1);
 }
 
 /*-----------------------------------------------------------------*/
@@ -854,7 +854,7 @@ aopGet (asmop * aop, int offset, bool bit16, bool dname)
 
   werror (E_INTERNAL_ERROR, __FILE__, __LINE__,
          "aopget got unsupported aop->type");
-  exit (0);
+  exit (1);
 }
 /*-----------------------------------------------------------------*/
 /* aopPut - puts a string for a aop                                */
@@ -868,7 +868,7 @@ aopPut (asmop * aop, char *s, int offset)
     {
       werror (E_INTERNAL_ERROR, __FILE__, __LINE__,
              "aopPut got offset > aop->size");
-      exit (0);
+      exit (1);
     }
 
   /* will assign value to value */
@@ -913,7 +913,7 @@ aopPut (asmop * aop, char *s, int offset)
        {
          werror (E_INTERNAL_ERROR, __FILE__, __LINE__,
                  "aopPut writting to code space");
-         exit (0);
+         exit (1);
        }
 
       while (offset > aop->coff)
@@ -1039,7 +1039,7 @@ aopPut (asmop * aop, char *s, int offset)
     default:
       werror (E_INTERNAL_ERROR, __FILE__, __LINE__,
              "aopPut got unsupported aop->type");
-      exit (0);
+      exit (1);
     }
 
 }
@@ -6958,7 +6958,11 @@ genNearPointerGet (operand * left,
   else
     rname = aopGet (AOP (left), 0, FALSE, FALSE);
 
+#ifdef THIS_COULD_BE_THE_EVER_LASTING_MIN_MIN_STACK_AUTO_BUG
   aopOp (result, ic, FALSE);
+#else
+  aopOp (result, ic, result?TRUE:FALSE);
+#endif
 
   /* if bitfield then unpack the bits */
   if (IS_BITVAR (retype))