struct / union in initializer, RFE #901.
[sdcc.git] / sdcc / support / regression / tests / gcc-torture-execute-pr49039.c
blobeecfbcdbcf26a8810dc84ddf6bf7ed853608fffc
1 /*
2 pr49039.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/49039 */
12 int cnt;
14 void
15 foo (unsigned int x, unsigned int y)
17 unsigned int minv, maxv;
18 if (x == 1 || y == -2U)
19 return;
20 minv = x < y ? x : y;
21 maxv = x > y ? x : y;
22 if (minv == 1)
23 ++cnt;
24 if (maxv == -2U)
25 ++cnt;
28 void
29 testTortureExecute (void)
31 #if !(defined (__GNUC__) && defined (__GNUC_MINOR__) && (__GNUC__ < 5))
32 foo (-2U, 1);
33 if (cnt != 2)
34 ASSERT (0);
35 return;
36 #endif