struct / union in initializer, RFE #901.
[sdcc.git] / sdcc / support / regression / tests / gcc-torture-execute-pr78617.c
blob783bbf52556567f3f38b1020a568e440ffc2f3e8
1 /*
2 pr78617.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 int a = 0;
12 int d = 1;
13 int f = 1;
15 int fn1() {
16 return a || 1 >> a;
19 int fn2(int p1, int p2) {
20 return p2 >= 2 ? p1 : p1 >> 1;
23 int fn3(int p1) {
24 return d ^ p1;
27 int fn4(int p1, int p2) {
28 return fn3(!d > fn2((f = fn1() - 1000) || p2, p1));
31 void
32 testTortureExecute (void) {
33 if (fn4(0, 0) != 1)
34 ASSERT (0);
35 return;