From: johanknol Date: Wed, 12 Mar 2003 09:56:11 +0000 (+0000) Subject: fixed bug #700797 X-Git-Url: https://git.gag.com/?a=commitdiff_plain;h=9eef7e171f6502fbd097e8242347883290eed89c;p=fw%2Fsdcc fixed bug #700797 git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@2379 4a8a32a2-be11-0410-ad9d-d568d2c75423 --- diff --git a/src/SDCCglue.c b/src/SDCCglue.c index dcca79fe..8dced77b 100644 --- a/src/SDCCglue.c +++ b/src/SDCCglue.c @@ -1185,8 +1185,10 @@ emitStaticSeg (memmap * map, FILE * out) resolveIvalSym (sym->ival); printIval (sym, sym->type, sym->ival, out); noAlloc--; - // if sym->ival is a string, WE don't need it anymore - if (IS_AST_SYM_VALUE(list2expr(sym->ival)) && + /* if sym is a simple string and sym->ival is a string, + WE don't need it anymore */ + if (IS_ARRAY(sym->type) && IS_CHAR(sym->type->next) && + IS_AST_SYM_VALUE(list2expr(sym->ival)) && list2val(sym->ival)->sym->isstrlit) { freeStringSymbol(list2val(sym->ival)->sym); }