struct / union in initializer, RFE #901.
[sdcc.git] / sdcc / support / regression / tests / gcc-torture-execute-981019-1.c
blobab64be35349611313d582d2b4e0b1af6b16df5a5
1 /*
2 981019-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 extern int f2(void);
12 extern int f3(void);
13 extern void f1(void);
15 void
16 ff(int fname, int part, int nparts)
18 if (fname) /* bb 0 */
20 if (nparts) /* bb 1 */
21 f1(); /* bb 2 */
23 else
24 fname = 2; /* bb 3 */
26 /* bb 4 is the branch to bb 10
27 (bb 10 is physically at the end of the loop) */
28 while (f3() /* bb 10 */)
30 if (nparts /* bb 5 */ && f2() /* bb 6 */)
32 f1(); /* bb 7 ... */
33 nparts = part;
34 if (f3()) /* ... bb 7 */
35 f1(); /* bb 8 */
36 f1(); /* bb 9 */
37 break;
41 if (nparts) /* bb 11 */
42 f1(); /* bb 12 */
43 return; /* bb 13 */
46 void
47 testTortureExecute (void)
49 ff(0, 1, 0);
50 return;
53 int f3(void) { static int x = 0; x = !x; return x; }
54 void f1(void) { ASSERT(0); }
55 int f2(void) { ASSERT(0); }