1 /*
2    20000412-2.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 #if !(defined (__SDCC_hc08) || defined (__SDCC_s08))
f(int a,int * y)12 int f(int a,int *y)
13 {
14   int x = a;
15 
16   if (a==0)
17     return *y;
18 
19   return f(a-1,&x);
20 }
21 #endif
22 
23 void
testTortureExecute(void)24 testTortureExecute (void)
25 {
26 #ifndef __SDCC_pic16
27 #if !(defined (__SDCC_mcs51) || defined (__SDCC_hc08) || defined (__SDCC_s08) || defined (__SDCC_ds390) || defined (__SDCC_pdk13) || defined (__SDCC_pdk14) || defined (__SDCC_pdk15))
28 #if !defined(__SDCC_pic14) // Unsupported reentrancy
29   if (f (10, (int *) 0) != 1)
30     ASSERT (0);
31   return;
32 #endif
33 #endif
34 #endif
35 }
36 
37