struct / union in initializer, RFE #901.
[sdcc.git] / sdcc / support / regression / tests / gcc-torture-execute-20040831-1.c
blobc93bcdfa1b7de3189b246f34ad604de6f3f595eb
1 /*
2 20040831-1.c from the execute part of the gcc torture suite.
3 */
5 #include <testfwk.h>
7 #ifdef __SDCC
8 #pragma std_c99
9 #pragma disable_warning 93
10 #endif
12 /* This testcase was being miscompiled, because operand_equal_p
13 returned that (unsigned long) d and (long) d are equal. */
15 void
16 testTortureExecute (void)
18 double d = -12.0;
19 long l = (d > 10000) ? (unsigned long) d : (long) d;
20 if (l != -12)
21 ASSERT (0);
22 return;