struct / union in initializer, RFE #901.
[sdcc.git] / sdcc / support / regression / tests / gcc-torture-execute-pr78675.c
bloba8b8438dc33910d9c4426130f62ee9df1b398301
1 /*
2 pr78675.c from the execute part of the gcc torture tests.
3 */
5 #include <testfwk.h>
7 #ifdef __SDCC
8 #pragma disable_warning 84
9 #endif
11 /* PR tree-optimization/78675 */
13 long int a;
15 long int
16 foo (long int x)
18 long int b;
19 while (a < 1)
21 b = a && x;
22 ++a;
24 return b;
27 void
28 testTortureExecute (void)
30 ASSERT (foo (0) == 0);
31 a = 0;
32 ASSERT (foo (1) == 0);
33 a = 0;
34 ASSERT (foo (25) == 0);
35 a = -64;
36 ASSERT (foo (0) == 0);
37 a = -64;
38 ASSERT (foo (1) == 0);
39 a = -64;
40 ASSERT (foo (25) == 0);
41 return;