struct / union in initializer, RFE #901.
[sdcc.git] / sdcc / support / regression / tests / gcc-torture-execute-pr49073.c
blobe4d572d9db5df610a057d4a0b4f5abc3296dbd2a
1 /*
2 pr49073.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/49073 */
13 int a[] = { 1, 2, 3, 4, 5, 6, 7 }, c;
15 void
16 testTortureExecute (void)
18 #if !(defined (__GNUC__) && defined (__GNUC_MINOR__) && (__GNUC__ < 5 && __GNUC_MINOR__ < 7))
19 int d = 1, i = 1;
20 _Bool f = 0;
23 d = a[i];
24 if (f && d == 4)
26 ++c;
27 break;
29 i++;
30 f = (d == 3);
32 while (d < 7);
33 if (c != 1)
34 ASSERT (0);
35 return;
36 #endif