Pick three bugfixes from next branch to trunk for inclusion in 4.5.0 RC2, as discusse...
[sdcc.git] / sdcc / support / regression / tests / gcc-torture-execute-20140212-1.c
blobb730fa4afba543bc076b699f7308dc2057d64bcf
1 /*
2 20140212-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 180
10 #endif
12 /* PR rtl-optimization/60116 */
13 /* Reported by Zhendong Su <su@cs.ucdavis.edu> */
15 int a, b, c, d = 1, e, f = 1, h, i, k;
16 char g, j;
18 void
19 fn1 (void)
21 int l;
22 e = 0;
23 c = 0;
24 for (;;)
26 k = a && b;
27 j = k * 54;
28 g = j * 147;
29 l = ~g + (long long) e && 1;
30 if (d)
31 c = l;
32 else
33 h = i = l * 9UL;
34 if (f)
35 return;
39 void
40 testTortureExecute (void)
42 fn1 ();
43 ASSERT (c == 1);