summaryrefslogtreecommitdiff
path: root/support/regression/tests/gcc-torture-execute-20030209-1.c
blob: 7fef7efc7fd5b3850dd7c1492d897aa9f66ae84e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
/*
   20030209-1.c from the execute part of the gcc torture tests.
 */

#include <testfwk.h>

#ifdef __SDCC
#pragma std_c99
#pragma disable_warning 93
#endif

#if !defined(__SDCC_mcs51) && !defined(__SDCC_pdk14) && !defined(__SDCC_pdk15) // Lack of memory
double x[10][10]; /* Was [100][100] originally, while the 9 below was 99, but that was too big for sdcc targets. */
#endif

void
testTortureExecute (void)
{
#if !defined(__SDCC_mcs51) && !defined(__SDCC_pdk14) && !defined(__SDCC_pdk15) // Lack of memory
  int i;

  i = 9;
  x[i][0] = 42;
  if (x[9][0] != 42)
    ASSERT (0);
  return;
#endif

}