struct / union in initializer, RFE #901.
[sdcc.git] / sdcc / support / regression / tests / gcc-torture-execute-990127-1.c
blobbc68f56193caa03fcdd0da6358f3cff1d920e8e0
1 /*
2 990127-1.c from the execute part of the gcc torture suite.
3 */
5 #include <testfwk.h>
7 #ifdef __SDCC
8 #pragma std_c99
9 #pragma disable_warning 85
10 #endif
12 void
13 testTortureExecute (void)
15 int a,b,c;
16 int *pa, *pb, *pc;
17 int **ppa, **ppb, **ppc;
18 int i,j,k,x,y,z;
20 a = 10;
21 b = 20;
22 c = 30;
23 pa = &a; pb = &b; pc = &c;
24 ppa = &pa; ppb = &pb; ppc = &pc;
25 x = 0; y = 0; z = 0;
27 for(i=0;i<10;i++){
28 if( pa == &a ) pa = &b;
29 else pa = &a;
30 while( (*pa)-- ){
31 x++;
32 if( (*pa) < 3 ) break;
33 else pa = &b;
35 x++;
36 pa = &b;
39 if ((*pa) != -5 || (*pb) != -5 || x != 43)
40 ASSERT (0);
42 return;