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