1 /*
2    930518-1.c from the execute part of the gcc torture suite.
3  */
4 
5 #include <testfwk.h>
6 
7 #ifdef __SDCC
8 #pragma std_c99
9 #endif
10 
11 int bar = 0;
12 
f(int * p)13 f (int *p)
14 {
15   int foo = 2;
16 
17   while (foo > bar)
18     {
19       foo -=  bar;
20       *p++ = foo;
21       bar = 1;
22     }
23 }
24 
25 void
testTortureExecute(void)26 testTortureExecute (void)
27 {
28   int tab[2];
29   tab[0] = tab[1] = 0;
30   f (tab);
31   if (tab[0] != 2 || tab[1] != 1)
32     ASSERT (0);
33   return;
34 }
35 
36