problem of static bit variables
git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@487
4a8a32a2-be11-0410-ad9d-
d568d2c75423
# include <malloc.h>
# define GC_malloc(x) calloc((x), 1)
# include <malloc.h>
# define GC_malloc(x) calloc((x), 1)
/*-----------------------------------------------------------------*/
void allocGlobal ( symbol *sym )
{
/*-----------------------------------------------------------------*/
void allocGlobal ( symbol *sym )
{
/* symbol name is internal name */
/* symbol name is internal name */
- sprintf (sym->rname,"%s%s", port->fun_prefix, sym->name);
+ if (!sym->level) /* local statics can come here */
+ sprintf (sym->rname,"%s%s", port->fun_prefix, sym->name);
/* add it to the operandKey reset */
addSet(&operKeyReset,sym);
/* add it to the operandKey reset */
addSet(&operKeyReset,sym);
/* if this is a static variable */
if ( IS_STATIC (sym->etype)) {
/* if this is a static variable */
if ( IS_STATIC (sym->etype)) {
- SPEC_OCLS(sym->etype) = port->mem.default_local_map;
- allocIntoSeg (sym);
sym->allocreq = 1;
return ;
}
sym->allocreq = 1;
return ;
}