Sign in
gnu
/
gcc
/
refs/tags/releases/gcc-4.8.2
/
.
/
gcc
/
testsuite
/
gcc.dg
/
pr44061.c
blob: 60a4260ae94c3257e9c9b37a945b1f654809ea39 [
file
] [
log
] [
blame
]
/* { dg-do compile } */
/* { dg-options "-O2 -Wall" } */
int
a
[
2
];
int
foo
(
int
q
)
{
if
(
__builtin_constant_p
(
q
))
{
if
(
q
==
4
)
return
a
[
4
];
/* { dg-bogus "array subscript is above array bounds" } */
else
return
a
[
0
];
}
else
return
a
[
q
];
}