Debian Codegraph @

gcc/testsuite/gcc.c-torture/execute/index-1.c

raw
1 /* { dg-skip-if "strict reloc overflow checking" { msp430-*-* } { "*" } { "-mcpu=msp430" "-mlarge"} } */
2
3 void abort (void);
4 void exit (int);
5
6 int a[] =
7 {
8 0, 1, 2, 3, 4, 5, 6, 7, 8, 9,
9 10, 11, 12, 13, 14, 15, 16, 17, 18, 19,
10 20, 21, 22, 23, 24, 25, 26, 27, 28, 29,
11 30, 31, 32, 33, 34, 35, 36, 37, 38, 39
12 };
13
14 int
15 f (long n)
16 {
17 return a[n - 100000];
18 }
19
20 int
21 main (void)
22 {
23 if (f (100030L) != 30)
24 abort();
25 exit (0);
26 }