struct / union in initializer, RFE #901.
[sdcc.git] / sdcc / support / regression / tests / gcc-torture-execute-20021015-1.c
blob5d281dbaf5127118338ee598787c845f954ba1cf
1 /*
2 20021015-1.c from the execute part of the gcc torture suite.
3 */
5 #include <testfwk.h>
7 #ifdef __SDCC
8 #pragma std_c99
9 #endif
11 #pragma disable_warning 85
13 /* PR opt/7409. */
15 char g_list[] = { '1' };
17 void g (void *p, char *list, int length, char **elementPtr, char **nextPtr)
19 if (*nextPtr != g_list)
20 ASSERT (0);
22 **nextPtr = 0;
25 void testTortureExecute (void)
27 char *list = g_list;
28 char *element;
29 int i, length = 100;
31 for (i = 0; *list != 0; i++)
33 char *prevList = list;
34 g (0, list, length, &element, &list);
35 length -= (list - prevList);
38 return;