struct / union in initializer, RFE #901.
[sdcc.git] / sdcc / support / regression / tests / gcc-torture-execute-pr91137.c
blob6581101c8a9f6f231ef169e4d5e6ce3b35f99d9c
1 /*
2 pr91137.c from the execute part of the gcc torture tests.
3 */
5 #include <testfwk.h>
7 #if !(defined(__SDCC_mcs51) && defined(__SDCC_MODEL_SMALL)) && !defined(__SDCC_pdk13) && !defined(__SDCC_pdk14) && !defined(__SDCC_pdk15) && !defined(__SDCC_mcs51) && !defined(__SDCC_sm83) && !defined(__SDCC_f8) // Lack of memory
8 long long a;
9 unsigned b;
10 int c[70];
11 int d[70][70];
12 int e;
14 void f(long long *g, int p2) {
15 *g = p2;
18 void fn2() {
19 for (int j = 0; j < 70; j++) {
20 for (int i = 0; i < 70; i++) {
21 if (b)
22 c[i] = 0;
23 for (int l = 0; l < 70; l++)
24 d[i][1] = d[l][i];
26 for (int k = 0; k < 70; k++)
27 e = c[0];
30 #endif
32 void
33 testTortureExecute (void)
35 #if !(defined(__SDCC_mcs51) && defined(__SDCC_MODEL_SMALL)) && !defined(__SDCC_pdk13) && !defined(__SDCC_pdk14) && !defined(__SDCC_pdk15) && !defined(__SDCC_mcs51) && !defined(__SDCC_sm83) && !defined(__SDCC_f8) // Lack of memory
36 b = 5;
37 for (int j = 0; j < 70; ++j)
38 c[j] = 2075593088;
39 fn2();
40 f(&a, e);
41 if (a)
42 ASSERT (0);
43 return;
44 #endif