summaryrefslogtreecommitdiff
path: root/support/regression/tests/bug1496419.c
blob: 239c9b361876eba2e73e8cda523c75dc44287986 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
/*
   bug1496419.c
*/

#include <testfwk.h>
#include <stddef.h>

typedef struct _NODE
{
  const struct _NODE * enter;
  const struct _NODE * down;
}NODE;

const NODE node1 = {NULL, NULL};

//sdcc loops allocating space for new symbols node1 and
//zzz until there is no more memory, then segfaults
//
//The reference to zzz inside the declaration of zzz
//triggers a loop allocating space for symbols node1
//and zzz
const NODE zzz = {&node1, &zzz};

void testBug(void)
{
}