+2006-06-16 Maarten Brock <sourceforge.brock AT dse.nl>
+
+ * src/SDCCglue.c (initPointer), fixed bug 1496419
+ * support/regression/tests/bug1496419.c: new, added
+
2006-06-21 Jesus Calvino-Fraga <jesusc at ece.ubc.ca>
* device/include/mcs51/at89c51ed2.h: Fixed bug 1510144 changed
valid char operands, allow signed operands for native code, added
division and modulo operator handling
* device/lib/pic16/libsdcc/char/divschar.c: divschar returns an int
-
+
As a consequence, onebyte.c (if split into two files) and muldiv.c
pass regression tests.
2006-06-17 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
* doc/Makefile.in: two runs of makeindex seem needed to get
- correct page references in the index of sdccman.pdf
+ correct page references in the index of sdccman.pdf
* doc/sdccman.lyx: mentioned cmon51, added links, small changes
2006-06-17 Borut Razem <borut.razem AT siol.net>
sym->rname, equ,
SPEC_ADDR (sym->etype));
}
- else {
- int size = getSize (sym->type) + sym->flexArrayLength;
- if (size==0) {
- werrorfl (sym->fileDef, sym->lineDef, E_UNKNOWN_SIZE, sym->name);
- }
- /* allocate space */
- if (options.debug) {
- fprintf (map->oFile, "==.\n");
- }
+ else
+ {
+ int size = getSize (sym->type) + sym->flexArrayLength;
+ if (size==0) {
+ werrorfl (sym->fileDef, sym->lineDef, E_UNKNOWN_SIZE, sym->name);
+ }
+ /* allocate space */
+ if (options.debug) {
+ fprintf (map->oFile, "==.\n");
+ }
if (IS_STATIC (sym->etype) || sym->level)
- tfprintf (map->oFile, "!slabeldef\n", sym->rname);
- else
- tfprintf (map->oFile, "!labeldef\n", sym->rname);
- tfprintf (map->oFile, "\t!ds\n",
- (unsigned int) size & 0xffff);
- }
+ tfprintf (map->oFile, "!slabeldef\n", sym->rname);
+ else
+ tfprintf (map->oFile, "!labeldef\n", sym->rname);
+ tfprintf (map->oFile, "\t!ds\n",
+ (unsigned int) size & 0xffff);
+ }
}
}
if (IS_AST_OP (expr) && expr->opval.op == '&') {
/* address of symbol */
if (IS_AST_SYM_VALUE (expr->left)) {
- val = copyValue (AST_VALUE (expr->left));
+ val = AST_VALUE (expr->left);
val->type = newLink (DECLARATOR);
if (SPEC_SCLS (expr->left->etype) == S_CODE) {
DCL_TYPE (val->type) = CPOINTER;
if (IS_EXTERN (sym->etype))
continue;
- /* if it is not static add it to the public
- table */
+ /* if it is not static add it to the public table */
if (!IS_STATIC (sym->etype))
{
addSetHead (&publics, sym);
if (mainf && IFFUNC_HASBODY(mainf->type))
{
-
/* entry point @ start of HOME */
fprintf (asmFile, "__sdcc_program_startup:\n");
--- /dev/null
+/*\r
+ bug1057979.c\r
+*/\r
+\r
+#include <testfwk.h>\r
+\r
+typedef struct _NODE\r
+{\r
+ const struct _NODE * enter;\r
+ const struct _NODE * down;\r
+}NODE;\r
+\r
+const NODE node1 = {NULL, NULL};\r
+\r
+//sdcc loops allocating space for new symbols node1 and\r
+//zzz until there is no more memory, then segfaults\r
+//\r
+//The reference to zzz inside the declaration of zzz\r
+//triggers a loop allocating space for symbols node1\r
+//and zzz\r
+const NODE zzz = {&node1, &zzz};\r