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-20040423-1.c
blobf8b3445e547b310b6e25c494d85ca7fb0708f61d
1 /*
2 20040423-1.c from the execute part of the gcc torture suite.
3 */
5 #include <testfwk.h>
7 #ifdef __SDCC
8 #pragma std_c99
9 #endif
11 #if 0 // TODO: enable when variable-length arrays are asupported!
12 #include <string.h>
14 int
15 sub1 (int i, int j)
17 typedef struct
19 int c[i+2];
20 }c;
21 int x[10], y[10];
23 if (j == 2)
25 memcpy (x, y, 10 * sizeof (int));
26 return sizeof (c);
28 else
29 return sizeof (c) * 3;
31 #endif
33 void
34 testTortureExecute (void)
36 #if 0
37 typedef struct
39 int c[22];
40 }c;
41 if (sub1 (20, 3) != sizeof (c)*3)
42 ASSERT (0);
44 return;
45 #endif