struct / union in initializer, RFE #901.
[sdcc.git] / sdcc / support / regression / tests / gcc-torture-execute-960327-1.c
blob405d3726cd8f1fc7c749fc6ecfc19d074fb30b2f
1 /*
2 960327-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 #include <stdio.h>
12 int
13 g (void)
15 return '\n';
18 void f ()
20 #if !defined(__SDCC_pdk14) && !defined(__SDCC_pdk15) // Lack of memory
21 char s[] = "abcedfg012345";
22 char *sp = s + 12;
24 switch (g ())
26 case '\n':
27 break;
30 while (*--sp == '0')
32 sprintf (sp + 1, "X");
34 ASSERT(s[12] == 'X');
35 #endif
38 void
39 testTortureExecute (void)
41 f ();
42 return;