struct / union in initializer, RFE #901.
[sdcc.git] / sdcc / support / regression / tests / gcc-torture-execute-pr44202-1.c
blob31fa21072130d74741f58e0f5075eca8af939bb0
1 /*
2 pr44202-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
11 int
12 add512(int a, int *b)
14 int c = a + 512;
15 if (c != 0)
16 *b = a;
17 return c;
20 int
21 add513(int a, int *b)
23 int c = a + 513;
24 if (c == 0)
25 *b = a;
26 return c;
29 void
30 testTortureExecute (void)
32 int b0 = -1;
33 int b1 = -1;
34 if (add512(-512, &b0) != 0 || b0 != -1 || add513(-513, &b1) != 0 || b1 != -513)
35 ASSERT (0);
36 return;