struct / union in initializer, RFE #901.
[sdcc.git] / sdcc / support / regression / tests / gcc-torture-execute-20080424-1.c
blobcf2876bd5e8654cb8602fd2e46dd77e9b022ef87
1 /*
2 20080424-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 /* PR tree-optimization/36008 */
13 #if !defined(__SDCC_mcs51) && !defined(__SDCC_pdk14) && !defined(__SDCC_pdk15) // Lack of memory
14 int g[48][3][3];
16 void
17 bar (int x[3][3], int y[3][3])
19 static int i;
20 if (x != g[i + 8] || y != g[i++])
21 ASSERT (0);
24 static inline void
25 foo (int x[][3][3])
27 int i;
28 for (i = 0; i < 8; i++)
30 int k = i + 8;
31 bar (x[k], x[k - 8]);
34 #endif
36 void
37 testTortureExecute (void)
39 #if !defined(__SDCC_mcs51) && !defined(__SDCC_pdk14) && !defined(__SDCC_pdk15) // Lack of memory
40 foo (g);
41 return;
42 #endif