Daily bump.
[official-gcc.git] / gcc / testsuite / gcc.dg / Wobjsize-1.c
blob988b8bcbf35d8ff2635c196fa7ec6c8a501ddcec
1 /* { dg-do compile } */
2 /* { dg-options "-O2 -Wall -Wno-array-bounds" } */
4 #include "Wobjsize-1.h"
6 char buf[6];
8 int main(int argc, char **argv)
10 strcpy (buf,"hello ");
11 return 0;
14 /* { dg-warning "\\\[-Wstringop-overflow" "warning" { target *-*-* } 0 }
15 { dg-message "file included" "included" { target *-*-* } 0 }
16 { dg-message "inlined from" "inlined" { target *-*-* } 0 }
18 The test might emit two warnings, one for the strcpy call and
19 another for the inlined call to __builtin___strcpy_chk() called
20 from strcpy().
21 { dg-prune-output "writing 7 bytes into a region of size 6" } */