struct / union in initializer, RFE #901.
[sdcc.git] / sdcc / support / regression / tests / gcc-torture-execute-pr71631.c
blobe75b550b3397e38cc9046ec2e092618a246471c8
1 /*
2 pr71631.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/71631 */
13 volatile char v;
14 int a = 1, b = 1, c = 1;
16 void
17 foo (const char *s)
19 while (*s++)
20 v = *s;
23 void
24 testTortureExecute (void)
26 volatile int d = 1;
27 volatile int e = 1;
28 int f = 1 / a;
29 int g = 1U < f;
30 int h = 2 + g;
31 int i = 3 % h;
32 int j = e && b;
33 int k = 1 == c;
34 int l = d != 0;
35 short m = (short) (-1 * i * l);
36 short x = j * (k * m);
37 if (i == 1)
38 foo ("AB");
39 if (x != -1)
40 ASSERT (0);
41 return;