1 /*
2    930526-1.c from the execute part of the gcc torture suite.
3  */
4 
5 #include <testfwk.h>
6 #include <string.h>
7 
8 #ifdef __SDCC
9 #pragma std_c99
10 #endif
11 
12 #ifndef __SDCC_pdk14 // Lack of memory
13 inline
f(int x)14 void f (int x)
15 {
16   int *(p[3]);
17   int m[3*4];
18   int i;
19 
20   memset (m, 0x00, sizeof (m));
21 
22   for (i = 0; i < 3; i++)
23     p[i] = m + x*i;
24 
25   p[0][2] = 0x5555;
26   p[1][0] = 0x3333;
27   p[2][1] = -23456;
28 
29   ASSERT (m[2] == 0x5555);
30   ASSERT (m[4] == 0x3333);
31   ASSERT (m[9] == -23456);
32 }
33 #endif
34 
35 void
testTortureExecute(void)36 testTortureExecute (void)
37 {
38 #ifndef __SDCC_pdk14 // Lack of memory
39   f (4);
40   return;
41 #endif
42 }
43 
44 extern inline void f (int x);
45 
46