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-20020916-1.c
blob44b0b5040364d38893d80e7c65539ddfa28b2f29
1 /*
2 20020916-1.c from the execute part of the gcc torture suite.
3 */
5 #include <testfwk.h>
7 #ifdef __SDCC
8 #pragma std_c99
9 #endif
11 /* Distilled from try_pre_increment in flow.c. If-conversion inserted
12 new instructions at the wrong place on ppc. */
14 int foo(int a)
16 int x;
17 x = 0;
18 if (a > 0) x = 1;
19 if (a < 0) x = 1;
20 return x;
23 void
24 testTortureExecute (void)
26 if (foo(1) != 1)
27 ASSERT(0);
28 return;