From 9eef7e171f6502fbd097e8242347883290eed89c Mon Sep 17 00:00:00 2001 From: johanknol Date: Wed, 12 Mar 2003 09:56:11 +0000 Subject: [PATCH] fixed bug #700797 git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@2379 4a8a32a2-be11-0410-ad9d-d568d2c75423 --- src/SDCCglue.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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); } -- 2.47.2