]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/testsuite/gcc.dg/Warray-bounds-15.c
replace ISL with isl
[thirdparty/gcc.git] / gcc / testsuite / gcc.dg / Warray-bounds-15.c
CommitLineData
f8269ad4
RB
1/* { dg-do compile } */
2/* { dg-options "-O2 -Warray-bounds" } */
3
4int a[10];
5int *foo1 (int i)
6{
7 return &a[10]; /* { dg-bogus "above array bounds" } */
8}
9int *foo2 (int i)
10{
11 return &a[11]; /* { dg-warning "above array bounds" } */
12}
13int foo3 (int i)
14{
15 return a[9]; /* { dg-bogus "above array bounds" } */
16}
17int foo4 (int i)
18{
19 return a[10]; /* { dg-warning "above array bounds" } */
20}