struct / union in initializer, RFE #901.
[sdcc.git] / sdcc / support / regression / tests / gcc-torture-execute-20000706-5.c
blob2c17682fb047b6959fa286ace116cdd604de2386
1 /*
2 20000706-5.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 // TODO: Enable when sdcc supports.
12 #if 0
13 struct baz { int a, b, c; };
15 struct baz *c;
17 void bar(int b)
19 if (c->a != 1 || c->b != 2 || c->c != 3 || b != 4)
20 ASSERT(0);
23 void foo(struct baz a, int b)
25 c = &a;
26 bar(b);
28 #endif
30 void
31 testTortureExecute (void)
33 #if 0
34 struct baz a;
35 a.a = 1;
36 a.b = 2;
37 a.c = 3;
38 foo(a, 4);
39 return;
40 #endif