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.

> --- 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.

> --- a/gcc/testsuite/g++.dg/cpp0x/constexpr-55573.C
> +++ b/gcc/testsuite/g++.dg/cpp0x/constexpr-55573.C
> @@ -1,8 +1,7 @@
>  // PR c++/55573
>  // { 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" }

Likewise.

> --- a/gcc/testsuite/g++.dg/ext/pr56790-1.C
> +++ b/gcc/testsuite/g++.dg/ext/pr56790-1.C
> @@ -1,6 +1,6 @@
>  /* { dg-do compile } */
>  /* { dg-options "-O2 -fdump-tree-ccp1" } */
> -/* { dg-prune-output "changes the ABI" } */
> +/* { dg-additional-options "-Wno-psabi" } */

Similarly, append -Wno-psabi to dg-options.

> --- a/gcc/testsuite/g++.dg/ext/vector23.C
> +++ b/gcc/testsuite/g++.dg/ext/vector23.C
> @@ -1,9 +1,6 @@
>  /* { dg-do compile { target c++14 } } */
>  /* { dg-options "-Wsign-conversion" } */
> -// Ignore warning on some powerpc-linux configurations.
> -// { dg-prune-output "non-standard ABI extension" }
> -// Ignore warning on Linux/x86
> -// { dg-prune-output "changes the ABI" }
> +/* { dg-additional-options "-Wno-psabi" } */

Similarly.

> --- 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-*-* ?

> --- 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-*-* } } } */

> --- 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.

> --- a/gcc/testsuite/gcc.dg/compat/vector-2_y.c
> +++ b/gcc/testsuite/gcc.dg/compat/vector-2_y.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-*-* } } } */

Likewise.

> --- 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.

> --- a/gcc/testsuite/gcc.dg/plugin/diagnostic-test-expressions-1.c
> +++ b/gcc/testsuite/gcc.dg/plugin/diagnostic-test-expressions-1.c
> @@ -1,5 +1,6 @@
>  /* { dg-do compile } */
>  /* { dg-options "-O -fdiagnostics-show-caret" } */
> +/* { dg-additional-options "-Wno-psabi" } */

Append to dg-options.

> --- a/gcc/testsuite/gcc.dg/pr34856.c
> +++ b/gcc/testsuite/gcc.dg/pr34856.c
> @@ -1,5 +1,5 @@
>  /* { dg-do compile } */
> -/* { dg-options "-O2" } */
> +/* { dg-options "-O2 -Wno-psabi" } */
>  /* { dg-options "-O2 -msse2" { target { i?86-*-* x86_64-*-* } } } */
>  /* { dg-options "-O2 -maltivec" { target { powerpc*-*-linux* && 
> powerpc_altivec_ok } } } */

Turn the last two into dg-additional-options without -O2 ?

> --- a/gcc/testsuite/gcc.dg/pr35442.c
> +++ b/gcc/testsuite/gcc.dg/pr35442.c
> @@ -1,6 +1,7 @@
>  /* PR c/35442 */
>  /* { dg-bogus "not supported by" "" { target *-*-* } 0 } */
>  /* { dg-options "-mabi=altivec" { target { { powerpc*-*-linux* } && ilp32 } 
> } } */
> +/* { dg-additional-options "-Wno-psabi" } */

Use -Wno-psabi as dg-options and -mabi=altivec as dg-additional-options?

> --- a/gcc/testsuite/gcc.dg/pr63914.c
> +++ b/gcc/testsuite/gcc.dg/pr63914.c
> @@ -1,6 +1,6 @@
>  /* { dg-do compile } */
>  /* { dg-options "-O2 -ffast-math" } */
> -/* { dg-prune-output "non-standard ABI extension" } */
> +/* { dg-additional-options "-Wno-psabi" } */

Append to dg-options?

>  /* { dg-additional-options "-fno-common" { target hppa*-*-hpux* } } */
>  /* { dg-additional-options "-msse" { target { i?86-*-* x86_64-*-* } } } */
>  /* { dg-require-effective-target int32plus } */
> diff --git a/gcc/testsuite/gcc.dg/pr69634.c b/gcc/testsuite/gcc.dg/pr69634.c
> index e4032b6..7076452 100644
> --- a/gcc/testsuite/gcc.dg/pr69634.c
> +++ b/gcc/testsuite/gcc.dg/pr69634.c
> @@ -1,6 +1,7 @@
>  /* { dg-do compile } */
>  /* { dg-options "-O2 -fno-dce -fschedule-insns -fno-tree-vrp 
> -fcompare-debug" } */
> -/* { dg-additional-options "-Wno-psabi -mno-sse" { target i?86-*-* 
> x86_64-*-* } } */
> +/* { dg-additional-options "-Wno-psabi" } */

Likewise.

> +/* { dg-additional-options "-mno-sse" { target i?86-*-* x86_64-*-* } } */
>  /* { dg-require-effective-target scheduling } */
>  
>  typedef unsigned short u16;

> --- a/gcc/testsuite/gcc.dg/torture/pr36891.c
> +++ b/gcc/testsuite/gcc.dg/torture/pr36891.c
> @@ -3,6 +3,7 @@
>  /* { dg-options "-ffast-math -msse" { target { { i?86-*-* x86_64-*-* } && 
> ia32 } } } */
>  /* { dg-require-effective-target sse { target { { i?86-*-* x86_64-*-* } && 
> ia32 } } } */
>  /* { dg-options "-ffast-math -mabi=altivec" { target { { powerpc*-*-linux* } 
> && ia32 } } } */
> +/* { dg-additional-options "-Wno-psabi" } */

Add -Wno-psabi to first dg-options, and turn the two latter dg-options
into dg-additional-options without -ffast-math?

> --- a/gcc/testsuite/gcc.dg/tree-ssa/forwprop-35.c
> +++ b/gcc/testsuite/gcc.dg/tree-ssa/forwprop-35.c
> @@ -1,5 +1,6 @@
>  /* { dg-do compile } */
>  /* { dg-options "-O -fdump-tree-cddce1" } */
> +/* { dg-additional-options "-Wno-psabi" } */
>  /* { dg-additional-options "-msse2" { target { i?86-*-* x86_64-*-* } } } */
>  
>  typedef int v4si __attribute__((vector_size(16)));

Append to dg-options?

> --- a/gcc/testsuite/gcc.dg/tree-ssa/pr71179.c
> +++ b/gcc/testsuite/gcc.dg/tree-ssa/pr71179.c
> @@ -1,6 +1,6 @@
> -
>  /* { dg-do compile } */
>  /* { dg-options "-O3 -ffast-math" } */
> +/* { dg-additional-options "-Wno-psabi" } */
>  
>  typedef float __m128 __attribute__ ((__vector_size__ (16), __may_alias__));

Likewise.
>  
> diff --git a/gcc/testsuite/gcc.dg/tree-ssa/ssa-fre-55.c 
> b/gcc/testsuite/gcc.dg/tree-ssa/ssa-fre-55.c
> index 7bfa284..b0c5af6 100644
> --- a/gcc/testsuite/gcc.dg/tree-ssa/ssa-fre-55.c
> +++ b/gcc/testsuite/gcc.dg/tree-ssa/ssa-fre-55.c
> @@ -1,5 +1,6 @@
>  /* { dg-do compile } */
>  /* { dg-options "-O -fdump-tree-optimized" } */
> +/* { dg-additional-options "-Wno-psabi" } */
>  
>  typedef int v4si __attribute__((vector_size(16)));

And again.

        Jakub

Reply via email to