1 /* { dg-do compile } */
2 /* { dg-options "-O3 -Warray-bounds" } */
5 unsigned char foo_size
;
10 const foo
*get_foo(int index
);
12 static int foo_loop(const foo
*myfoo
) {
14 if (myfoo
->foo_size
< 3)
16 for (i
= 0; i
< myfoo
->foo_size
; i
++) {
17 if (myfoo
->buf
[i
] != 1) /* { dg-bogus "above array bounds" } */
24 static int run_foo(void) {
26 for (i
= 0; i
< 1; i
++) {
27 const foo
*myfoo
= get_foo(i
);