On Tue, Oct 11, 2016 at 06:11:29PM +0200, Jakub Jelinek wrote:
> On Tue, Oct 11, 2016 at 03:43:03PM +0000, Segher Boessenkool wrote:
> > It is much nicer to avoid a warning than to manually prune it from the
> > compiler output.  This patch adds -Wno-psabi to various testcases, and
> > removes dg-prune-output, for the testcases where x86 and/or PowerPC had
> > those (or did warn, so the testcase failed).  It also removes -w whenever
> > there is -Wno-psabi already.
> > 
> > Tested on powerpc64-linux {-m32,-m64}, and on x86_64-linux
> > {-m64,-m32/-msse,-m32/-mno-sse}.  No changes, except there are a few
> > fewer FAILs with -m32/-mno-sse (because of the -Wno-psabi).
> > 
> > Is this okay for trunk?
> 
> LGTM, though if you'd like to spend some short extra time on it, further
> changes would be appreciated.

This set is ballooning so much already :-)  I'll see what I can do.

> > --- a/gcc/testsuite/g++.dg/cpp0x/constexpr-53094-3.C
> > +++ b/gcc/testsuite/g++.dg/cpp0x/constexpr-53094-3.C
> > @@ -1,7 +1,6 @@
> >  // { dg-do compile { target c++11 } }
> >  // { dg-options "" }
> > -// Ignore warning on some powerpc-ibm-aix configurations.
> > -// { dg-prune-output "non-standard ABI extension" }
> > +// { dg-additional-options "-Wno-psabi" }
> 
> Here I'd just use
> // { dg-options "-Wno-psabi" }
> and not add dg-additional-options.

I would get rid of dg-options completely, it's an abomination, but that
unfortunately changes behaviour.  dg-additional-options always does what
you think, but dg-options does not.

> > --- a/gcc/testsuite/gcc.c-torture/compile/pr33617.c
> > +++ b/gcc/testsuite/gcc.c-torture/compile/pr33617.c
> > @@ -1,4 +1,4 @@
> > -/* { dg-options "-w -Wno-psabi" { target { i?86-*-* x86_64-*-* } } } */
> > +/* { dg-options "-Wno-psabi" { target { i?86-*-* x86_64-*-* } } } */
> 
> Is there any reason to limit the -Wno-psabi to i?86-*-* x86_64-*-* ?

No not really, I mindlessly edited what was already there.

> > --- a/gcc/testsuite/gcc.dg/Wstrict-aliasing-bogus-ref-all-2.c
> > +++ b/gcc/testsuite/gcc.dg/Wstrict-aliasing-bogus-ref-all-2.c
> > @@ -2,6 +2,7 @@
> >  /* { dg-options "-O2 -Wall" } */
> >  /* { dg-options "-O2 -Wall -mabi=altivec" { target { { powerpc*-*-linux* } 
> > && ilp32 } } } */
> >  /* { dg-options "-O2 -Wall -msse2" { target { i?86-*-* x86_64-*-* } } } */
> > +/* { dg-additional-options "-Wno-psabi" } */
> 
> This really should be turned into:
> /* { dg-options "-O2 -Wall -Wno-psabi" } */
> /* { dg-additional-options "-mabi=altivec" { target { { powerpc*-*-linux* } 
> && ilp32 } } } */
> /* { dg-additional-options "-msse2" { target { i?86-*-* x86_64-*-* } } } */

Right.

> 
> > --- a/gcc/testsuite/gcc.dg/compat/vector-2_x.c
> > +++ b/gcc/testsuite/gcc.dg/compat/vector-2_x.c
> > @@ -1,5 +1,5 @@
> > -/* { dg-options "-w" } */
> > -/* { dg-options "-w -mno-mmx -Wno-psabi" { target { i?86-*-* x86_64-*-* } 
> > } } */
> > +/* { dg-options "-Wno-psabi" } */
> > +/* { dg-options "-Wno-psabi -mno-mmx" { target { i?86-*-* x86_64-*-* } } } 
> > */
> 
> Similarly.

compat.exp does not support dg-additional-options.

> > --- a/gcc/testsuite/gcc.dg/graphite/id-pr46845.c
> > +++ b/gcc/testsuite/gcc.dg/graphite/id-pr46845.c
> > @@ -1,4 +1,4 @@
> > -/* { dg-options "-O2 -ffast-math -fgraphite-identity -w -Wno-psabi" { 
> > target { i?86-*-* x86_64-*-* powerpc*-*-* } } } */
> > +/* { dg-options "-O2 -ffast-math -fgraphite-identity -Wno-psabi" { target 
> > { i?86-*-* x86_64-*-* powerpc*-*-* } } } */
> 
> This is just weird.  I'd try to remove the target selector altogether.

OK, will try.


Segher

Reply via email to