From 0412770b744287215f6aa899c0561350eb5ce25b Mon Sep 17 00:00:00 2001 From: johanknol Date: Sun, 23 Sep 2001 13:44:10 +0000 Subject: [PATCH] fixed bug #463839 git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@1298 4a8a32a2-be11-0410-ad9d-d568d2c75423 --- src/SDCCast.c | 2 +- src/SDCCsymt.c | 10 +++++++--- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/SDCCast.c b/src/SDCCast.c index 89b365c4..0a429066 100644 --- a/src/SDCCast.c +++ b/src/SDCCast.c @@ -1107,7 +1107,7 @@ gatherAutoInit (symbol * autoChain) /* insert the symbol into the symbol table */ /* with level = 0 & name = rname */ newSym = copySymbol (sym); - addSym (SymbolTab, newSym, newSym->name, 0, 0, 1); + addSym (SymbolTab, newSym, newSym->rname, 0, 0, 1); /* now lift the code to main */ if (IS_AGGREGATE (sym->type)) diff --git a/src/SDCCsymt.c b/src/SDCCsymt.c index 97634105..7164549b 100644 --- a/src/SDCCsymt.c +++ b/src/SDCCsymt.c @@ -217,13 +217,12 @@ findSymWithLevel (bucket ** stab, symbol * sym) **/ while (bp) { - if (strcmp (bp->name, sym->name) == 0 && bp->level <= sym->level) { /* if this is parameter then nothing else need to be checked */ if (((symbol *) (bp->sym))->_isparm) return (bp->sym); - /* if levels match then block numbers hsould also match */ + /* if levels match then block numbers should also match */ if (bp->level && bp->level == sym->level && bp->block == sym->block) return (bp->sym); /* if levels don't match then we are okay */ @@ -957,7 +956,7 @@ addSymChain (symbol * symHead) then check if the type match, if the types match then delete the current entry and add the new entry */ if ((csym = findSymWithLevel (SymbolTab, sym)) && - csym->level == sym->level) { + csym->level == sym->level && csym->localof == sym->localof) { /* one definition extern ? */ if (IS_EXTERN (csym->etype) || IS_EXTERN (sym->etype)) { @@ -2278,6 +2277,11 @@ initCSupport () int bwd, su, muldivmod, tofrom, rlrr; + if (getenv("SDCC_NO_C_SUPPORT")) { + /* for debugging only */ + return; + } + floatType = newFloatLink (); for (bwd = 0; bwd < 3; bwd++) -- 2.30.2