gcc/testsuite/gcc.dg/pr94189.c
raw| 1 | /* PR middle-end/94189 */ |
| 2 | /* { dg-do compile } */ |
| 3 | /* { dg-options "-O2 -fcompare-debug" } */ |
| 4 | |
| 5 | const char a[] = { 'a', 'b', 'c', 'd' };/* { dg-message "declared here" } */ |
| 6 | |
| 7 | int |
| 8 | foo (void) |
| 9 | { |
| 10 | return __builtin_strnlen (a, 5); /* { dg-warning "specified bound 5 exceeds the size 4 of unterminated array" } */ |
| 11 | } |