struct / union in initializer, RFE #901.
[sdcc.git] / sdcc / support / regression / tests / gcc-torture-execute-pr78586.c
blob9c223eaa710c2cce00703dc537d0a8129b613342
1 /*
2 pr78586.c from the execute part of the gcc torture tests.
3 */
5 #include <testfwk.h>
7 #ifdef __SDCC
8 #pragma std_c99
9 #endif
11 #include <stdio.h>
13 /* PR tree-optimization/78586 */
15 #if !defined(__SDCC_pdk14) && !defined(__SDCC_pdk15) // Lackof memory
16 void
17 foo (unsigned long x)
19 char a[30];
20 unsigned long b = sprintf (a, "%lu", x);
21 if (b != 4)
22 ASSERT (0);
24 #endif
26 void
27 testTortureExecute (void)
29 #if !defined(__SDCC_pdk14) && !defined(__SDCC_pdk15) // Lackof memory
30 foo (1000);
31 return;
32 #endif