struct / union in initializer, RFE #901.
[sdcc.git] / sdcc / support / regression / tests / gcc-torture-execute-pr20187-1.c
blob5ce94da81abd2b6649c4775e302321e50df9e62b
1 /*
2 pr207187-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 // Some ports do not support long long yet.
12 #if !defined(__SDCC_pic14) && !defined(__SDCC_pic16)
13 int a = 0x101;
14 int b = 0x100;
16 int
17 foo (void)
19 return (((unsigned char) (unsigned long long) ((a ? a : 1) & (a * b)))
20 ? 0 : 1);
22 #endif
24 void
25 testTortureExecute (void)
27 #if !defined(__SDCC_pic14) && !defined(__SDCC_pic16)
28 ASSERT (!(1 - foo ()));
29 #endif