struct / union in initializer, RFE #901.
[sdcc.git] / sdcc / support / regression / tests / gcc-torture-execute-931017-1.c
blob13baaa1b29633b331256bfbcf32d3abce098e6bc
1 /*
2 931017-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 int v;
13 void f (void);
15 void
16 testTortureExecute (void)
18 f ();
19 return;
22 int h1 (void)
24 return 0;
27 int h2 (int *e)
29 ASSERT(e == &v);
30 return 0;
33 int g (char *c)
35 int i;
36 int b;
40 i = h1 ();
41 if (i == -1)
42 return 0;
43 else if (i == 1)
44 h1 ();
46 while (i == 1);
49 b = h2 (&v);
50 while (i == 5);
52 if (i != 2)
53 return b;
54 *c = 'a';
56 return 0;
60 void f (void)
62 char c;
63 g (&c);