1 2 3 4 5 6 7 8 9 10 11 12 13
/* PR driver/107787 */ /* { dg-do compile } */ /* { dg-options "-O2 -Werror=array-bounds=1" } */ /* { dg-message "some warnings being treated as errors" "" {target "*-*-*"} 0 } */ int a[10]; /* { dg-note "while referencing" } */ int* f(void) { a[-1] = 0; /* { dg-error "is below array bounds" } */ return a; }