Pick three bugfixes from next branch to trunk for inclusion in 4.5.0 RC2, as discusse...
[sdcc.git] / sdcc / support / regression / tests / gcc-torture-execute-930513-2.c
blob62e35bdf118b9e96de475e7e664240b681fcc93b
1 /*
2 930513-2.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 sub3 (const int *i)
16 void eq (int a, int b)
18 static int i = 0;
19 if (a != i)
20 ASSERT (0);
21 i++;
24 void
25 testTortureExecute (void)
27 int i;
29 for (i = 0; i < 4; i++)
31 const int j = i;
32 int k;
33 sub3 (&j);
34 k = j;
35 eq (k, k);
37 return;