Pick three bugfixes from next branch to trunk for inclusion in 4.5.0 RC2, as discusse...
[sdcc.git] / sdcc / support / regression / tests / gcc-torture-execute-930526-1.c
bloba561f66d9ceef9c4e238a66f4626779efb2b3da9
1 /*
2 930526-1.c from the execute part of the gcc torture suite.
3 */
5 #include <testfwk.h>
6 #include <string.h>
8 #ifdef __SDCC
9 #pragma std_c99
10 #endif
12 #ifndef __SDCC_pdk14 // Lack of memory
13 inline
14 void f (int x)
16 int *(p[3]);
17 int m[3*4];
18 int i;
20 memset (m, 0x00, sizeof (m));
22 for (i = 0; i < 3; i++)
23 p[i] = m + x*i;
25 p[0][2] = 0x5555;
26 p[1][0] = 0x3333;
27 p[2][1] = -23456;
29 ASSERT (m[2] == 0x5555);
30 ASSERT (m[4] == 0x3333);
31 ASSERT (m[9] == -23456);
33 #endif
35 void
36 testTortureExecute (void)
38 #ifndef __SDCC_pdk14 // Lack of memory
39 f (4);
40 return;
41 #endif
44 extern inline void f (int x);