Hi Jason! On 2020-05-22T17:03:01-0400, Jason Merrill via Gcc-patches <gcc-patches@gcc.gnu.org> wrote: > [...] > > This issue suggests that we should be running the ubsan tests in multiple > standard modes like the rest of the G++ testsuite, so I've made that change > as well.
> --- a/gcc/testsuite/g++.dg/ubsan/ubsan.exp > +++ b/gcc/testsuite/g++.dg/ubsan/ubsan.exp > @@ -26,7 +26,7 @@ ubsan_init > > # Main loop. > if [check_effective_target_fsanitize_undefined] { > - gcc-dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/*.C > $srcdir/c-c++-common/ubsan/*.c]] "" "" > + g++-dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/*.C > $srcdir/c-c++-common/ubsan/*.c]] "" "" > } Hmm, but that means that testing is now no longer running the "optimization options torture testing": Running [...]/source-gcc/gcc/testsuite/g++.dg/ubsan/ubsan.exp ... -PASS: c-c++-common/ubsan/align-1.c -O0 (test for excess errors) -PASS: c-c++-common/ubsan/align-1.c -O0 execution test -PASS: c-c++-common/ubsan/align-1.c -O1 (test for excess errors) -PASS: c-c++-common/ubsan/align-1.c -O1 execution test -PASS: c-c++-common/ubsan/align-1.c -O2 (test for excess errors) -PASS: c-c++-common/ubsan/align-1.c -O2 execution test -PASS: c-c++-common/ubsan/align-1.c -O2 -flto -fno-use-linker-plugin -flto-partition=none (test for excess errors) -PASS: c-c++-common/ubsan/align-1.c -O2 -flto -fno-use-linker-plugin -flto-partition=none execution test -PASS: c-c++-common/ubsan/align-1.c -O2 -flto -fuse-linker-plugin -fno-fat-lto-objects (test for excess errors) -PASS: c-c++-common/ubsan/align-1.c -O2 -flto -fuse-linker-plugin -fno-fat-lto-objects execution test -PASS: c-c++-common/ubsan/align-1.c -O3 -g (test for excess errors) -PASS: c-c++-common/ubsan/align-1.c -O3 -g execution test -PASS: c-c++-common/ubsan/align-1.c -Os (test for excess errors) -PASS: c-c++-common/ubsan/align-1.c -Os execution test +PASS: c-c++-common/ubsan/align-1.c -std=gnu++14 (test for excess errors) +PASS: c-c++-common/ubsan/align-1.c -std=gnu++14 execution test +PASS: c-c++-common/ubsan/align-1.c -std=gnu++17 (test for excess errors) +PASS: c-c++-common/ubsan/align-1.c -std=gnu++17 execution test +PASS: c-c++-common/ubsan/align-1.c -std=gnu++2a (test for excess errors) +PASS: c-c++-common/ubsan/align-1.c -std=gnu++2a execution test +PASS: c-c++-common/ubsan/align-1.c -std=gnu++98 (test for excess errors) +PASS: c-c++-common/ubsan/align-1.c -std=gnu++98 execution test Etc. Not sure if that was intentional? I suppose this removed way more testsuite coverage compared to what different C++ '-std=[...]' add? > The testcase changes are all to accommodate that. > /* { dg-options "-fsanitize=bounds -Wno-array-bounds" } */ > +/* { dg-options "-fsanitize=bounds -Wno-array-bounds -Wno-volatile" { target > c++ } } */ Simpler would've been (untested): +/* { dg-additional-options "-Wno-volatile" { target c++ } } */ Etc. ;-) Grüße Thomas ----------------- Mentor Graphics (Deutschland) GmbH, Arnulfstraße 201, 80634 München / Germany Registergericht München HRB 106955, Geschäftsführer: Thomas Heurung, Alexander Walter