struct / union in initializer, RFE #901.
[sdcc.git] / sdcc / support / regression / tests / gcc-torture-execute-990513-1.c
blob9b6dbd1f7127209f994530c603d32f7e00521907
1 /*
2 990513-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 <string.h>
13 void foo (int *BM_tab, int j)
15 int *BM_tab_base;
17 BM_tab_base = BM_tab;
18 BM_tab += 0400;
19 while (BM_tab_base != BM_tab)
21 *--BM_tab = j;
22 *--BM_tab = j;
23 *--BM_tab = j;
24 *--BM_tab = j;
28 void
29 testTortureExecute (void)
31 #if !defined(__SDCC_mcs51) && !defined(__SDCC_pdk14) && !defined(__SDCC_pdk15) && !( (defined (__SDCC_mos6502) || defined(__SDCC_mos65c02 )) && defined(__SDCC_STACK_AUTO) ) // Lack of memory
32 int BM_tab[0400];
33 memset (BM_tab, 0, sizeof (BM_tab));
34 foo (BM_tab, 6);
35 if (BM_tab[0] != 6)
36 ASSERT (0);
37 return;
38 #endif