struct / union in initializer, RFE #901.
[sdcc.git] / sdcc / support / regression / tests / gcc-torture-execute-pr78559.c
blob1a65114257ea652c752fa69df935326cf5cb61c2
1 /*
2 pr78559.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 rtl-optimization/78559 */
13 int g = 20;
14 int d = 0;
16 short
17 fn2 (int p1, int p2)
19 return p2 >= 2 || 5 >> p2 ? p1 : p1 << p2;
22 void
23 testTortureExecute (void)
25 int result = 0;
26 lbl_2582:
27 if (g)
29 for (int c = -3; c; c++)
30 result = fn2 (1, g);
32 else
34 for (int i = 0; i < 2; i += 2)
35 if (d)
36 goto lbl_2582;
38 if (result != 1)
39 ASSERT (0);
40 return;