Mercurial > hg > CbC > CbC_gcc
annotate gcc/testsuite/gcc.dg/Warray-bounds-21.c @ 131:84e7813d76e9
gcc-8.2
author | mir3636 |
---|---|
date | Thu, 25 Oct 2018 07:37:49 +0900 |
parents | 04ced10e8804 |
children |
rev | line source |
---|---|
111 | 1 /* { dg-do compile } */ |
2 /* { dg-options "-O2 -Warray-bounds" } */ | |
3 | |
4 int t[1]; | |
5 int a (void); | |
6 int fct (int r, long e, int neg) | |
7 { | |
8 int d = 0; | |
9 if (r == 4) | |
10 r = neg ? 3 : 2; | |
11 if (__builtin_expect(e < -52, 0)) | |
12 d = r == 0 && a () ? 1 : 2; | |
13 else | |
14 { | |
15 int i, n = 53; | |
16 if (e < 0) | |
17 n += e; | |
18 for (i = 1 ; i < n / 64 + 1 ; i++) | |
19 d = t[i]; /* { dg-bogus "array bounds" } */ | |
20 } | |
21 return d; | |
22 } |