struct / union in initializer, RFE #901.
[sdcc.git] / sdcc / support / regression / tests / gcc-torture-execute-20100708-1.c
blob7421c623e5dc1a26e927b52041d7cda5eacf15e1
1 /*
2 20100708-1.c from the execute part of the gcc torture tests.
3 */
5 #include <testfwk.h>
7 #ifdef __SDCC
8 #pragma disable_warning 93
9 #endif
11 /* PR middle-end/44843 */
12 /* Verify that we don't use the alignment of struct S for inner accesses. */
14 struct S
16 double for_alignment;
17 struct { int x, y, z; } a[16];
20 void f(struct S *s);
22 void f(struct S *s)
24 unsigned int i;
26 for (i = 0; i < 16; ++i)
28 s->a[i].x = 0;
29 s->a[i].y = 0;
30 s->a[i].z = 0;
34 void
35 testTortureExecute (void)
37 #ifndef __SDCC_pdk14 // Lack of memory
38 struct S s;
39 f (&s);
40 return;
41 #endif