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