Imported Upstream version 2.9.0
[debian/cc1111] / support / regression / tests / bug1496419.c
1 /*
2    bug1496419.c
3 */
4
5 #include <testfwk.h>
6
7 typedef struct _NODE
8 {
9   const struct _NODE * enter;
10   const struct _NODE * down;
11 }NODE;
12
13 const NODE node1 = {NULL, NULL};
14
15 //sdcc loops allocating space for new symbols node1 and
16 //zzz until there is no more memory, then segfaults
17 //
18 //The reference to zzz inside the declaration of zzz
19 //triggers a loop allocating space for symbols node1
20 //and zzz
21 const NODE zzz = {&node1, &zzz};
22
23 void testBug(void)
24 {
25 }