struct / union in initializer, RFE #901.
[sdcc.git] / sdcc / support / regression / tests / gcc-torture-execute-20000801-2.c
blob76222ccf72cc3cb4f6f4ced68a0f6335c36e46c5
1 /*
2 20000801-2.c from the execute part of the gcc torture tests.
3 */
5 #include <testfwk.h>
7 #ifdef __SDCC
8 #pragma std_c99
9 #endif
11 int bar(void);
12 int baz(void);
14 struct foo {
15 struct foo *next;
18 struct foo *test(struct foo *node)
20 while (node) {
21 if (bar() && !baz())
22 break;
23 node = node->next;
25 return node;
28 int bar (void)
30 return 0;
33 int baz (void)
35 return 0;
38 void
39 testTortureExecute (void)
41 struct foo a, b, *c;
43 a.next = &b;
44 b.next = (struct foo *)0;
45 c = test (&a);
46 if (c)
47 ASSERT (0);
48 return;