struct / union in initializer, RFE #901.
[sdcc.git] / sdcc / support / regression / tests / gcc-torture-execute-20090814-1.c
blobdf30f9dc36c4325c18bf5611249bde5d8ebaed77
1 /*
2 20090814-1.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
12 bar (int *a)
14 return *a;
16 int i;
17 int
18 foo (int (*a)[2])
20 return bar (&(*a)[i]);
23 int a[2];
24 void
25 testTortureExecute (void)
27 a[0] = -1;
28 a[1] = 42;
29 i = 1;
30 if (foo (&a) != 42)
31 ASSERT (0);
32 return;