[ucsim-z80] Fix #3828: uCsim SM83 flags simulation
[sdcc.git] / sdcc / support / regression / tests / gcc-torture-execute-pr70586.c
blobc1381cc7522c7bb645a362d0f1acc79bb4b6da15
1 /*
2 pr70586.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/70586 */
13 int a, e, f;
14 short b, c, d;
16 int
17 foo (int x, int y)
19 return (y == 0 || (x && y == 1)) ? x : x % y;
22 static short
23 bar (void)
25 int i = foo (c, f);
26 f = foo (d, 2);
27 #if 0 // Enable when SDCC intermingles
28 int g = foo (b, c);
29 int h = foo (g > 0, c);
30 c = (3 >= h ^ 7) <= foo (i, c);
31 if (foo (e, 1))
32 return a;
33 #endif
34 return 0;
37 void
38 testTortureExecute (void)
40 bar ();
41 return;