struct / union in initializer, RFE #901.
[sdcc.git] / sdcc / support / regression / tests / gcc-torture-execute-pr68143_1.c
blob6389840724e0c03631380496becd7cf62dd6c9b7
1 /*
2 pr68143_1.c from the execute part of the gcc torture tests.
3 */
5 #include <testfwk.h>
7 #define NULL 0
9 struct stuff
11 int a;
12 int b;
13 int c;
14 int d;
15 int e;
16 char *f;
17 int g;
20 void
21 bar (struct stuff *x)
23 if (x->g != 2)
24 ASSERT (0);
27 void
28 testTortureExecute (void)
30 struct stuff x = {0, 0, 0, 0, 0, NULL, 0};
31 x.a = 100;
32 x.d = 100;
33 x.g = 2;
34 /* Struct should now look like {100, 0, 0, 100, 0, 0, 0, 2}. */
35 bar (&x);
36 return;