X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=src%2FSDCCmem.c;h=b2a8c7b5dfca427c88d4b93cb97839ee1f3e7356;hb=93a5bd697ecc846637ce8e797e0bc3a08167aee5;hp=dc0982b44137381faf5189e571f0a864e171194a;hpb=7faa2c7f7e56d31567f05ae41a0c431f9bced6de;p=fw%2Fsdcc diff --git a/src/SDCCmem.c b/src/SDCCmem.c index dc0982b4..b2a8c7b5 100644 --- a/src/SDCCmem.c +++ b/src/SDCCmem.c @@ -375,6 +375,7 @@ allocGlobal (symbol * sym) return; } + if(!TARGET_IS_PIC16 || (TARGET_IS_PIC16 && sym->level)) /* register storage class ignored changed to FIXED */ if (SPEC_SCLS (sym->etype) == S_REGISTER) SPEC_SCLS (sym->etype) = S_FIXED; @@ -392,6 +393,7 @@ allocGlobal (symbol * sym) /* if it is fixed, then allocate depending on the */ /* current memory model, same for automatics */ if (SPEC_SCLS (sym->etype) == S_FIXED || + (TARGET_IS_PIC16 && (SPEC_SCLS (sym->etype) == S_REGISTER) && (sym->level==0)) || SPEC_SCLS (sym->etype) == S_AUTO) { if (port->mem.default_globl_map != xdata) { /* set the output class */ @@ -816,6 +818,7 @@ allocVariables (symbol * symChain) if (csym && csym->level == sym->level) werror (E_DUPLICATE_TYPEDEF, sym->name); + SPEC_EXTR (sym->etype) = 0; addSym (TypedefTab, sym, sym->name, sym->level, sym->block, 0); continue; /* go to the next one */ }