struct / union in initializer, RFE #901.
[sdcc.git] / sdcc / support / regression / tests / gcc-torture-execute-20031010-1.c
blob32915abecc92cdf1f3b207f1f195ca8fc586c033
1 /*
2 20031010-1.c from the execute part of the gcc torture tests.
3 */
5 #include <testfwk.h>
7 #ifdef __SDCC
8 #pragma std_c99
9 #endif
12 /* A reminder to process ops in generate_expr_as_of_bb exactly once. */
14 #ifndef __SDCC_pdk14 // Lack of memory
15 long
16 foo (long ct, long cf, _Bool p1, _Bool p2, _Bool p3)
18 long diff;
20 diff = ct - cf;
22 if (p1)
24 if (p2)
26 if (p3)
28 long tmp = ct;
29 ct = cf;
30 cf = tmp;
32 diff = ct - cf;
35 return diff;
38 ASSERT (0);
40 #endif
42 void
43 testTortureExecute (void)
45 #ifndef __SDCC_pdk14 // Lack of memory
46 if (foo(2, 3, 1, 1, 1) == 0)
47 ASSERT (0);
48 return;
49 #endif