]> git.gag.com Git - fw/sdcc/blobdiff - src/SDCCmem.c
fixed the 'char *s="hallo";' initialization bug
[fw/sdcc] / src / SDCCmem.c
index f369a04fda8efd3580aff192be37d82f3efbe3e3..da118602a3f1fcc5d481a5af9dffbb32ba1aae86 100644 (file)
@@ -404,12 +404,12 @@ allocGlobal (symbol * sym)
 
   if (SPEC_SCLS (sym->etype) == S_XDATA)
     {
-      SPEC_OCLS (sym->etype) = xdata;
       // should we move this to the initialized data segment?
       if (port->genXINIT &&
          sym->ival && (sym->level==0) && !SPEC_ABSA(sym->etype)) {
        SPEC_OCLS(sym->etype)=xidata;
-       addSet(&xidata->syms, sym);
+      } else {
+       SPEC_OCLS (sym->etype) = xdata;
       }
       allocIntoSeg (sym);
       return;