fixed bug #661910
authorjohanknol <johanknol@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Fri, 24 Jan 2003 13:51:11 +0000 (13:51 +0000)
committerjohanknol <johanknol@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Fri, 24 Jan 2003 13:51:11 +0000 (13:51 +0000)
git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@2169 4a8a32a2-be11-0410-ad9d-d568d2c75423

ChangeLog
src/SDCCast.c

index f001cf81b67d23b8e68aa134222f8a1b5caa8404..a7440963a73d1a0979efc099a30dbdd2575c866b 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2003-01-24    <johan@CP255758-A>
+
+       * src/SDCCast.c (createIvalCharPtr): fixed bug #661910
+
 2003-01-24  Bernhard Held <bernhard@bernhardheld.de>
 
        * src/mcs51/peeph.def: better assembler identation by Frieder
index c92f179b3b1aeb2086d18e374432f25a505db952..3651b7866debdbfbc77bb4325f0fa5796627834b 100644 (file)
@@ -966,12 +966,6 @@ createIvalCharPtr (ast * sym, sym_link * type, ast * iexpr)
                                   newAst_VALUE (valueFromLit ((float) i))),
                               newAst_VALUE (valueFromLit (*s))));
 
-      // now we don't need iexpr's symbol anymore
-      {
-       symbol *sym=AST_SYMBOL(iexpr);
-       memmap *segment=SPEC_OCLS(sym->etype);
-       deleteSetItem(&segment->syms, sym);
-      }
       return decorateType (resolveSymbols (rast));
     }
 
@@ -1057,8 +1051,11 @@ gatherAutoInit (symbol * autoChain)
     {
 
       /* resolve the symbols in the ival */
-      if (sym->ival)
+      if (sym->ival) {
+       noAlloc++;
        resolveIvalSym (sym->ival);
+       noAlloc--;
+      }
 
       /* if this is a static variable & has an */
       /* initial value the code needs to be lifted */