struct / union in initializer, RFE #901.
[sdcc.git] / sdcc / support / regression / tests / gcc-torture-execute-pr81555.c
blob14d97140ff55609dc9ef6e69a00bce1af86805f1
1 /*
2 pr81555.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/81555 */
13 unsigned int a = 1, d = 0xfaeU, e = 0xe376U;
14 _Bool b = 0, f = 1;
15 unsigned char g = 1;
17 void
18 foo (void)
20 _Bool c = a != b;
21 if (c)
22 f = 0;
23 if (e & c & (unsigned char)d & c)
24 g = 0;
27 void
28 testTortureExecute (void)
30 #if !(defined (__GNUC__) && (__GNUC__ < 7))
31 foo ();
32 if (f || g != 1)
33 ASSERT (0);
34 return;
35 #endif