1 /*
2 index-1.c from the execute part of the gcc torture tests.
3 */
4 
5 #include <testfwk.h>
6 
7 #ifndef __SDCC_pdk14 // Lack of memory
8 int a[] =
9 {
10   0,  1,  2,  3,  4,  5,  6,  7,  8,  9,
11   10, 11, 12, 13, 14, 15, 16, 17, 18, 19,
12   20, 21, 22, 23, 24, 25, 26, 27, 28, 29,
13   30, 31, 32, 33, 34, 35, 36, 37, 38, 39
14 };
15 
16 int
f(long n)17 f (long n)
18 {
19   return a[n - 100000];
20 }
21 #endif
22 
23 void
testTortureExecute(void)24 testTortureExecute (void)
25 {
26 #ifndef __SDCC_pdk14 // Lack of memory
27   if (f (100030L) != 30)
28     ASSERT(0);
29   return;
30 #endif
31 }
32