diff options
author | Martin Sebor <msebor@redhat.com> | 2019-07-30 20:42:36 +0000 |
---|---|---|
committer | Martin Sebor <msebor@gcc.gnu.org> | 2019-07-30 14:42:36 -0600 |
commit | 5df20b9095880a7df02d40874f7061ab7b9e8eb9 (patch) | |
tree | 667a123d2dcc45954fa5030c01144c564dc0da92 /gcc | |
parent | f16be16d2d4d48fb918bf8996f5fa0727b1ab1e3 (diff) | |
download | gcc-5df20b9095880a7df02d40874f7061ab7b9e8eb9.zip gcc-5df20b9095880a7df02d40874f7061ab7b9e8eb9.tar.gz gcc-5df20b9095880a7df02d40874f7061ab7b9e8eb9.tar.bz2 |
PR testsuite/91258 - g++.dg/ubsan/vla-1.C and gcc.dg/strlenopt-70.c fail starting with r273783
gcc/testsuite/ChangeLog:
* g++.dg/ubsan/vla-1.C: Suppress a valid warning.
From-SVN: r273915
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/testsuite/g++.dg/ubsan/vla-1.C | 10 |
2 files changed, 13 insertions, 2 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 6afc2f0..2610036 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2019-07-30 Martin Sebor <msebor@redhat.com> + + PR testsuite/91258 + * g++.dg/ubsan/vla-1.C: Suppress a valid warning. + 2019-07-30 Steven G. Kargl <kargl@gcc.gnu.org> PR fortran/91296 diff --git a/gcc/testsuite/g++.dg/ubsan/vla-1.C b/gcc/testsuite/g++.dg/ubsan/vla-1.C index 311cdb1..81e93e3 100644 --- a/gcc/testsuite/g++.dg/ubsan/vla-1.C +++ b/gcc/testsuite/g++.dg/ubsan/vla-1.C @@ -1,8 +1,14 @@ // { dg-do run } -// { dg-options "-Wno-vla -fsanitize=undefined" } +// { dg-options "-Wno-vla -Wno-stringop-overflow -fsanitize=undefined" } // { dg-output "index 1 out of bounds" } -void f(int i) { +void f(int i) +{ + /* The following creates an array of char[4] on the stack and + the initialization triggers a -Wstringop-overflow with LTO + (or when the function is inlined into the called, such as + with -fwhole-program). See PR91258. The warning is + suppressed above. */ int ar[i] = { 42, 24 }; } |