Hi! On Thu, 26 Jan 2017 11:54:07 +0100, Jakub Jelinek <ja...@redhat.com> wrote: > On Thu, Jan 26, 2017 at 09:57:14AM +0100, Thomas Schwinge wrote: > > On Mon, 23 Jan 2017 10:19:33 +0100, Martin Liška <mli...@suse.cz> wrote: > > > --- a/gcc/testsuite/gcc.dg/asan/use-after-scope-3.c > > > +++ b/gcc/testsuite/gcc.dg/asan/use-after-scope-3.c > > > @@ -1,5 +1,6 @@ > > > // { dg-do run } > > > // { dg-shouldfail "asan" } > > > +// { dg-additional-options "-O0" } > > > > As these tests per "gcc/testsuite/gcc.dg/asan/asan.exp" are run with > > "gcc-dg-runtest", which will "cycle through a list of optimization > > options as c-torture does", is it really appropriate to hard-code "-O0" > > here? Shouldn't instead be all testing be "dg-skip"ped (or similar) > > unless "-O0" is in effect? > > Indeed, I see > UNRESOLVED: gcc.dg/asan/use-after-scope-9.c -O2 -flto -fuse-linker-plugin > -fno-fat-lto-objects scan-tree-dump-times asan1 "= ASAN_POISON \\\\(\\\\)" 1 > too. > > For that kind of thing, the standard way is to add -ffat-lto-objects. > As for -O* in */asan/* tests, that is indeed a bug, most tests do it right. > > The following patch should fix that, ok for trunk?
Looks good to me (but I can't approve it, as you know). One additional comment: > --- gcc/testsuite/g++.dg/asan/pr69276.C.jj 2016-02-04 23:14:18.000000000 > +0100 > +++ gcc/testsuite/g++.dg/asan/pr69276.C 2017-01-26 11:40:10.490771046 > +0100 > @@ -1,6 +1,7 @@ > /* { dg-do run } */ > /* { dg-shouldfail "asan" } */ > -/* { dg-additional-options "-O0 -fno-lto" } */ > +/* { dg-skip-if "" { *-*-* } { "*" } { "-O0" } } */ > +/* { dg-additional-options "-fno-lto" } */ Probably can get rid of that "-fno-lto", too, as "-flto" is not used together with "-O0"? Grüße Thomas