diff mbox

[3/3] testsuite: Use -Wno-psabi instead of pruning compiler messages

Message ID 542abea5edd7daaca4773879326e7f600dc7cc5d.1475782244.git.segher@kernel.crashing.org
State New
Headers show

Commit Message

Segher Boessenkool Oct. 6, 2016, 7:57 p.m. UTC
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).

Tested on powerpc64-linux {-m32,-m64}, and on x86_64-linux.  Should I
test something else as well, maybe some options for x86 (which?)


2016-10-06  Segher Boessenkool  <segher@kernel.crashing.org>

gcc/testsuite/
	* c-c++-common/Wbool-operation-1.c: Add -Wno-psabi and do not prune
	the messages printed by -Wpsabi.
	* c-c++-common/Wunused-var-15.c: Ditto.
	* c-c++-common/convert-vec-1.c: Ditto.
	* c-c++-common/scal-to-vec2.c: Ditto.
	* c-c++-common/vector-compare-1.c: Ditto.
	* c-c++-common/vector-compare-2.c: Ditto.
	* c-c++-common/vector-compare-4.c: Ditto.
	* g++.dg/conversion/simd1.C: Ditto.
	* g++.dg/cpp0x/constexpr-53094-2.C: Ditto.
	* g++.dg/cpp0x/constexpr-53094-3.C: Ditto.
	* g++.dg/cpp0x/constexpr-55573.C: Ditto.
	* g++.dg/ext/attribute-test-1.C: Ditto.
	* g++.dg/ext/attribute-test-2.C: Ditto.
	* g++.dg/ext/attribute-test-3.C: Ditto.
	* g++.dg/ext/attribute-test-4.C: Ditto.
	* g++.dg/ext/pr56790-1.C: Ditto.
	* g++.dg/ext/pr70290.C: Ditto.
	* g++.dg/ext/vector14.C: Ditto.
	* g++.dg/ext/vector23.C: Ditto.
	* g++.dg/torture/pr38565.C: Ditto.
	* g++.dg/torture/pr63419.C: Ditto.
	* gcc.dg/Wstrict-aliasing-bogus-ref-all-2.c: Ditto.
	* gcc.dg/plugin/diagnostic-test-expressions-1.c: Ditto.
	* gcc.dg/pr34856.c: Ditto.
	* gcc.dg/pr35442.c: Ditto.
	* gcc.dg/pr53060.c: Ditto.
	* gcc.dg/pr63594-1.c: Ditto.
	* gcc.dg/pr63594-2.c: Ditto.
	* gcc.dg/pr63914.c: Ditto.
	* gcc.dg/pr69634.c: Ditto.
	* gcc.dg/torture/pr36891.c: Ditto.
	* gcc.dg/torture/pr70083.c: Ditto.
	* gcc.dg/torture/pr70307.c: Ditto.
	* gcc.dg/tree-ssa/forwprop-35.c: Ditto.
	* gcc.dg/tree-ssa/pr71179.c: Ditto.
	* gcc.dg/tree-ssa/ssa-fre-55.c: Ditto.

---
 gcc/testsuite/c-c++-common/Wbool-operation-1.c              | 2 --
 gcc/testsuite/c-c++-common/Wunused-var-15.c                 | 3 ---
 gcc/testsuite/c-c++-common/convert-vec-1.c                  | 3 ++-
 gcc/testsuite/c-c++-common/scal-to-vec2.c                   | 4 +---
 gcc/testsuite/c-c++-common/vector-compare-1.c               | 4 +---
 gcc/testsuite/c-c++-common/vector-compare-2.c               | 4 +---
 gcc/testsuite/c-c++-common/vector-compare-4.c               | 2 --
 gcc/testsuite/g++.dg/conversion/simd1.C                     | 4 +---
 gcc/testsuite/g++.dg/cpp0x/constexpr-53094-2.C              | 4 +---
 gcc/testsuite/g++.dg/cpp0x/constexpr-53094-3.C              | 3 +--
 gcc/testsuite/g++.dg/cpp0x/constexpr-55573.C                | 3 +--
 gcc/testsuite/g++.dg/ext/attribute-test-1.C                 | 6 +-----
 gcc/testsuite/g++.dg/ext/attribute-test-2.C                 | 6 +-----
 gcc/testsuite/g++.dg/ext/attribute-test-3.C                 | 5 +----
 gcc/testsuite/g++.dg/ext/attribute-test-4.C                 | 5 +----
 gcc/testsuite/g++.dg/ext/pr56790-1.C                        | 2 +-
 gcc/testsuite/g++.dg/ext/pr70290.C                          | 4 ----
 gcc/testsuite/g++.dg/ext/vector14.C                         | 3 +--
 gcc/testsuite/g++.dg/ext/vector23.C                         | 5 +----
 gcc/testsuite/g++.dg/torture/pr38565.C                      | 5 ++---
 gcc/testsuite/g++.dg/torture/pr63419.C                      | 2 --
 gcc/testsuite/gcc.dg/Wstrict-aliasing-bogus-ref-all-2.c     | 4 +---
 gcc/testsuite/gcc.dg/plugin/diagnostic-test-expressions-1.c | 1 +
 gcc/testsuite/gcc.dg/pr34856.c                              | 5 +----
 gcc/testsuite/gcc.dg/pr35442.c                              | 4 +---
 gcc/testsuite/gcc.dg/pr53060.c                              | 5 +----
 gcc/testsuite/gcc.dg/pr63594-1.c                            | 1 -
 gcc/testsuite/gcc.dg/pr63594-2.c                            | 1 -
 gcc/testsuite/gcc.dg/pr63914.c                              | 2 +-
 gcc/testsuite/gcc.dg/pr69634.c                              | 3 ++-
 gcc/testsuite/gcc.dg/torture/pr36891.c                      | 4 +---
 gcc/testsuite/gcc.dg/torture/pr70083.c                      | 4 ----
 gcc/testsuite/gcc.dg/torture/pr70307.c                      | 4 ----
 gcc/testsuite/gcc.dg/tree-ssa/forwprop-35.c                 | 1 +
 gcc/testsuite/gcc.dg/tree-ssa/pr71179.c                     | 2 +-
 gcc/testsuite/gcc.dg/tree-ssa/ssa-fre-55.c                  | 1 +
 36 files changed, 30 insertions(+), 91 deletions(-)

Comments

Jakub Jelinek Oct. 6, 2016, 9:08 p.m. UTC | #1
On Thu, Oct 06, 2016 at 07:57:37PM +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).
> 
> Tested on powerpc64-linux {-m32,-m64}, and on x86_64-linux.  Should I
> test something else as well, maybe some options for x86 (which?)

If you could test on x86_64 with -m32/-mno-sse, it would help, but if you
don't do that, I'll check it after it is checked in in my i686-linux
bootstraps.

> --- a/gcc/testsuite/c-c++-common/scal-to-vec2.c
> +++ b/gcc/testsuite/c-c++-common/scal-to-vec2.c
> @@ -1,9 +1,7 @@
>  /* { dg-do compile } */   
>  /* { dg-options "-fno-common" { target hppa*-*-hpux* } } */
> -/* { dg-options "-mabi=altivec" { target { { powerpc*-*-linux* } && ilp32 } } } */

Why are you removing these lines (note, some tests still have them)?
I'd think it would be just enough to add the dg-additional-options.
For i386 it also adds -msse2, so that even the default is CPU without
vector ISAs, it still tests those.

>  /* { dg-options "-msse2" { target { i?86-*-* x86_64-*-* } } } */
> -/* Ignore warning on some powerpc-ibm-aix configurations. */
> -/* { dg-prune-output "non-standard ABI extension" } */
> +/* { dg-additional-options "-Wno-psabi" } */
>  
>  /* Test for C_MAYBE_CONST are folded correctly when 
>     expanding an expression to vector.  */

Otherwise LGTM, but I'd say it is not all that we want to do.
It would be nice to grep also for all tests that have both -Wpsabi and -w
in dg-options or dg-additional-options, and try to remove the -w
which got usually added because of these rs6000 warnings.

	Jakub
Segher Boessenkool Oct. 6, 2016, 9:31 p.m. UTC | #2
On Thu, Oct 06, 2016 at 11:08:52PM +0200, Jakub Jelinek wrote:
> On Thu, Oct 06, 2016 at 07:57:37PM +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).
> > 
> > Tested on powerpc64-linux {-m32,-m64}, and on x86_64-linux.  Should I
> > test something else as well, maybe some options for x86 (which?)
> 
> If you could test on x86_64 with -m32/-mno-sse, it would help, but if you
> don't do that, I'll check it after it is checked in in my i686-linux
> bootstraps.

I'll fire one off, np.

> > --- a/gcc/testsuite/c-c++-common/scal-to-vec2.c
> > +++ b/gcc/testsuite/c-c++-common/scal-to-vec2.c
> > @@ -1,9 +1,7 @@
> >  /* { dg-do compile } */   
> >  /* { dg-options "-fno-common" { target hppa*-*-hpux* } } */
> > -/* { dg-options "-mabi=altivec" { target { { powerpc*-*-linux* } && ilp32 } } } */
> 
> Why are you removing these lines (note, some tests still have them)?

I removed it because I thought it was only there to avoid the problems.
Note it only enables -mabi=altivec for 32-bit.  We also get better test
coverage by *not* overriding the options.  But I later changed my mind,
figured we want it because most 32-bit configurations do not have the
altivec abi enabled by default.  And then I forgot to undo these few, sigh.

> I'd think it would be just enough to add the dg-additional-options.
> For i386 it also adds -msse2, so that even the default is CPU without
> vector ISAs, it still tests those.

Right.

> >  /* { dg-options "-msse2" { target { i?86-*-* x86_64-*-* } } } */
> > -/* Ignore warning on some powerpc-ibm-aix configurations. */
> > -/* { dg-prune-output "non-standard ABI extension" } */
> > +/* { dg-additional-options "-Wno-psabi" } */
> >  
> >  /* Test for C_MAYBE_CONST are folded correctly when 
> >     expanding an expression to vector.  */
> 
> Otherwise LGTM, but I'd say it is not all that we want to do.
> It would be nice to grep also for all tests that have both -Wpsabi and -w
> in dg-options or dg-additional-options, and try to remove the -w
> which got usually added because of these rs6000 warnings.

Both -Wno-psabi and -w, okay.  I looked for just -w and that didn't seem
so feasible to update.


Segher
diff mbox

Patch

diff --git a/gcc/testsuite/c-c++-common/Wbool-operation-1.c b/gcc/testsuite/c-c++-common/Wbool-operation-1.c
index 552b044..9ed53aa 100644
--- a/gcc/testsuite/c-c++-common/Wbool-operation-1.c
+++ b/gcc/testsuite/c-c++-common/Wbool-operation-1.c
@@ -34,5 +34,3 @@  fn (bool b, bool b2, T b3, int n, v4si v)
 
   return r;
 }
-
-/* { dg-prune-output ".*GCC vector passed by reference.*" } */
diff --git a/gcc/testsuite/c-c++-common/Wunused-var-15.c b/gcc/testsuite/c-c++-common/Wunused-var-15.c
index b0f680a..b52a436 100644
--- a/gcc/testsuite/c-c++-common/Wunused-var-15.c
+++ b/gcc/testsuite/c-c++-common/Wunused-var-15.c
@@ -15,6 +15,3 @@  foo (V v)	/* { dg-bogus "set but not used" } */
   V w = x;	/* { dg-bogus "set but not used" } */
   bar (w[1]);
 }
-
-/* Ignore a warning that is irrelevant to the purpose of this test.  */
-/* { dg-prune-output ".*GCC vector passed by reference.*" } */
diff --git a/gcc/testsuite/c-c++-common/convert-vec-1.c b/gcc/testsuite/c-c++-common/convert-vec-1.c
index 862190d..5717294 100644
--- a/gcc/testsuite/c-c++-common/convert-vec-1.c
+++ b/gcc/testsuite/c-c++-common/convert-vec-1.c
@@ -1,4 +1,5 @@ 
 /* { dg-do compile } */
-/* { dg-prune-output "changes the ABI" } */
+/* { dg-additional-options "-Wno-psabi" } */
+
 typedef float v2sf __attribute__ ((vector_size (8)));
 v2sf sub (void) { return (v2sf) 0.0; } /* { dg-error "can't convert" } */
diff --git a/gcc/testsuite/c-c++-common/scal-to-vec2.c b/gcc/testsuite/c-c++-common/scal-to-vec2.c
index e2c93ee..5e44f89 100644
--- a/gcc/testsuite/c-c++-common/scal-to-vec2.c
+++ b/gcc/testsuite/c-c++-common/scal-to-vec2.c
@@ -1,9 +1,7 @@ 
 /* { dg-do compile } */   
 /* { dg-options "-fno-common" { target hppa*-*-hpux* } } */
-/* { dg-options "-mabi=altivec" { target { { powerpc*-*-linux* } && ilp32 } } } */
 /* { dg-options "-msse2" { target { i?86-*-* x86_64-*-* } } } */
-/* Ignore warning on some powerpc-ibm-aix configurations. */
-/* { dg-prune-output "non-standard ABI extension" } */
+/* { dg-additional-options "-Wno-psabi" } */
 
 /* Test for C_MAYBE_CONST are folded correctly when 
    expanding an expression to vector.  */
diff --git a/gcc/testsuite/c-c++-common/vector-compare-1.c b/gcc/testsuite/c-c++-common/vector-compare-1.c
index 8416c8d..f3e987d 100644
--- a/gcc/testsuite/c-c++-common/vector-compare-1.c
+++ b/gcc/testsuite/c-c++-common/vector-compare-1.c
@@ -1,8 +1,6 @@ 
 /* { dg-do compile } */
-/* { dg-options "-mabi=altivec" { target { { powerpc*-*-linux* } && ilp32 } } } */
 /* { dg-prune-output "operand types are" } */
-/* Ignore warning on some powerpc-ibm-aix configurations. */
-/* { dg-prune-output "non-standard ABI extension" } */
+/* { dg-additional-options "-Wno-psabi" } */
 
 #define vector(elcount, type)  \
 __attribute__((vector_size((elcount)*sizeof(type)))) type
diff --git a/gcc/testsuite/c-c++-common/vector-compare-2.c b/gcc/testsuite/c-c++-common/vector-compare-2.c
index 5ebe9e3..7150411 100644
--- a/gcc/testsuite/c-c++-common/vector-compare-2.c
+++ b/gcc/testsuite/c-c++-common/vector-compare-2.c
@@ -1,9 +1,7 @@ 
 /* { dg-do compile } */   
 /* { dg-options "-fno-common" { target hppa*-*-hpux* } } */
-/* { dg-options "-mabi=altivec" { target { { powerpc*-*-linux* } && ilp32 } } } */
 /* { dg-options "-msse2" { target { i?86-*-* x86_64-*-* } } } */
-/* Ignore warning on some powerpc-ibm-aix configurations. */
-/* { dg-prune-output "non-standard ABI extension" } */
+/* { dg-additional-options "-Wno-psabi" } */
 
 /* Test if C_MAYBE_CONST are folded correctly when 
    creating VEC_COND_EXPR.  */
diff --git a/gcc/testsuite/c-c++-common/vector-compare-4.c b/gcc/testsuite/c-c++-common/vector-compare-4.c
index e7d37eb..4af3724 100644
--- a/gcc/testsuite/c-c++-common/vector-compare-4.c
+++ b/gcc/testsuite/c-c++-common/vector-compare-4.c
@@ -1,8 +1,6 @@ 
 /* PR c/68062 */
 /* { dg-do compile } */
 /* { dg-options "-Wsign-compare -Wno-psabi" } */
-/* Ignore warning on some powerpc configurations. */
-/* { dg-prune-output "non-standard ABI extension" } */
 
 typedef signed char __attribute__ ((vector_size (4))) v4qi;
 typedef unsigned char __attribute__ ((vector_size (4))) uv4qi;
diff --git a/gcc/testsuite/g++.dg/conversion/simd1.C b/gcc/testsuite/g++.dg/conversion/simd1.C
index 7955f68..69eda08 100644
--- a/gcc/testsuite/g++.dg/conversion/simd1.C
+++ b/gcc/testsuite/g++.dg/conversion/simd1.C
@@ -1,5 +1,6 @@ 
 /* { dg-do compile } */
 /* { dg-options "-msse2" { target { i?86-*-* x86_64-*-* } } } */
+/* { dg-additional-options "-Wno-psabi" } */
 
 /* Test overload resolution of vector types.
    From Janis Johnson and Paolo Bonzini, based on PR/16882 */
@@ -21,6 +22,3 @@  void foo ()
   vss = vld(i, vssp);
   vss = vld(i, cvssp);
 }
-
-/* Ignore a warning that is irrelevant to the purpose of this test.  */
-/* { dg-prune-output ".*GCC vector returned by reference.*" } */
diff --git a/gcc/testsuite/g++.dg/cpp0x/constexpr-53094-2.C b/gcc/testsuite/g++.dg/cpp0x/constexpr-53094-2.C
index f34619a..797b0ad 100644
--- a/gcc/testsuite/g++.dg/cpp0x/constexpr-53094-2.C
+++ b/gcc/testsuite/g++.dg/cpp0x/constexpr-53094-2.C
@@ -1,7 +1,5 @@ 
 // { dg-do compile { target c++11 } }
-// Ignore warning on some powerpc-ibm-aix configurations.
-// { dg-prune-output "non-standard ABI extension" }
-// { dg-prune-output "changes the ABI" }
+// { dg-additional-options "-Wno-psabi" }
 
 typedef float __attribute__ ((vector_size (4 * sizeof (float)))) V4;
 constexpr V4 build (float x, float y, float z) { return __extension__ (V4){ x, y, z, 0 };}
diff --git a/gcc/testsuite/g++.dg/cpp0x/constexpr-53094-3.C b/gcc/testsuite/g++.dg/cpp0x/constexpr-53094-3.C
index 58c00ed..2b5766f 100644
--- 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" }
 
 typedef float __attribute__ ((vector_size (4 * sizeof (float)))) V4;
 
diff --git a/gcc/testsuite/g++.dg/cpp0x/constexpr-55573.C b/gcc/testsuite/g++.dg/cpp0x/constexpr-55573.C
index bec69c7..39b1130 100644
--- 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" }
 
 template <typename T, int N>
 struct ExtVecTraits {
diff --git a/gcc/testsuite/g++.dg/ext/attribute-test-1.C b/gcc/testsuite/g++.dg/ext/attribute-test-1.C
index 93e08d7..a10f6c8 100644
--- a/gcc/testsuite/g++.dg/ext/attribute-test-1.C
+++ b/gcc/testsuite/g++.dg/ext/attribute-test-1.C
@@ -1,5 +1,5 @@ 
 // { dg-do run }
-// { dg-options "" }
+// { dg-options "-Wno-psabi" }
 // PR c++/13989
 
 extern "C" void abort();
@@ -33,7 +33,3 @@  int main()
 
   return 0;
 }
-
-/* Ignore a warning that is irrelevant to the purpose of this test.  */
-/* { dg-prune-output ".*GCC vector returned by reference.*" } */
-/* { dg-prune-output "changes the ABI" } */
diff --git a/gcc/testsuite/g++.dg/ext/attribute-test-2.C b/gcc/testsuite/g++.dg/ext/attribute-test-2.C
index d7c417d..8f80ad9 100644
--- a/gcc/testsuite/g++.dg/ext/attribute-test-2.C
+++ b/gcc/testsuite/g++.dg/ext/attribute-test-2.C
@@ -1,5 +1,5 @@ 
 // { dg-do run }
-// { dg-options "-Wno-abi" }
+// { dg-options "-Wno-abi -Wno-psabi" }
 // PR c++/9844
 
 extern "C" void abort();
@@ -47,7 +47,3 @@  int main()
 
   return 0;
 }
-
-/* Ignore a warning that is irrelevant to the purpose of this test.  */
-/* { dg-prune-output ".*GCC vector returned by reference.*" } */
-/* { dg-prune-output "changes the ABI" } */
diff --git a/gcc/testsuite/g++.dg/ext/attribute-test-3.C b/gcc/testsuite/g++.dg/ext/attribute-test-3.C
index 4b0939e..1590d62 100644
--- a/gcc/testsuite/g++.dg/ext/attribute-test-3.C
+++ b/gcc/testsuite/g++.dg/ext/attribute-test-3.C
@@ -1,4 +1,5 @@ 
 // { dg-do run }
+// { dg-additional-options "-Wno-psabi" }
 
 #define vector __attribute__((vector_size(16)))
 
@@ -49,7 +50,3 @@  int main() {
        abort();
   return 0;
 }
-
-/* Ignore a warning that is irrelevant to the purpose of this test.  */
-/* { dg-prune-output ".*GCC vector returned by reference.*" } */
-/* { dg-prune-output "changes the ABI" } */
diff --git a/gcc/testsuite/g++.dg/ext/attribute-test-4.C b/gcc/testsuite/g++.dg/ext/attribute-test-4.C
index c3e949a..968bb68 100644
--- a/gcc/testsuite/g++.dg/ext/attribute-test-4.C
+++ b/gcc/testsuite/g++.dg/ext/attribute-test-4.C
@@ -1,4 +1,5 @@ 
 // { dg-do run }
+// { dg-additional-options "-Wno-psabi" }
 
 #define vector __attribute__((vector_size(16)))
 
@@ -46,7 +47,3 @@  int main() {
        abort();
   return 0;
 }
-
-/* Ignore a warning that is irrelevant to the purpose of this test.  */
-/* { dg-prune-output ".*GCC vector returned by reference.*" } */
-/* { dg-prune-output "changes the ABI" } */
diff --git a/gcc/testsuite/g++.dg/ext/pr56790-1.C b/gcc/testsuite/g++.dg/ext/pr56790-1.C
index b413e8b..6eab355 100644
--- 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" } */
 
 typedef long vec __attribute__ ((vector_size (2 * sizeof (long))));
 
diff --git a/gcc/testsuite/g++.dg/ext/pr70290.C b/gcc/testsuite/g++.dg/ext/pr70290.C
index f524227..a358c81 100644
--- a/gcc/testsuite/g++.dg/ext/pr70290.C
+++ b/gcc/testsuite/g++.dg/ext/pr70290.C
@@ -18,7 +18,3 @@  test2 (vec x, vec y)
   vec one = zero + 1;
   return (x < y) ? one : zero;
 }
-
-/* Ignore a warning that is irrelevant to the purpose of this test.  */
-/* { dg-prune-output ".*GCC vector passed by reference.*" } */
-
diff --git a/gcc/testsuite/g++.dg/ext/vector14.C b/gcc/testsuite/g++.dg/ext/vector14.C
index 8e79210..b07a9ff 100644
--- a/gcc/testsuite/g++.dg/ext/vector14.C
+++ b/gcc/testsuite/g++.dg/ext/vector14.C
@@ -2,8 +2,7 @@ 
 // { dg-do compile }
 // { dg-options "-msse" { target { { i?86-*-* x86_64-*-* } && ilp32 } } }
 // { dg-require-effective-target sse }
-// Ignore warning on some powerpc-linux configurations.
-// { dg-prune-output "non-standard ABI extension" }
+// { dg-additional-options "-Wno-psabi" }
 // { dg-prune-output "mangled name" }
 
 #define vector __attribute__((vector_size(16)))
diff --git a/gcc/testsuite/g++.dg/ext/vector23.C b/gcc/testsuite/g++.dg/ext/vector23.C
index a50b286..53cc729 100644
--- 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" } */
 
 typedef double vecd __attribute__((vector_size(4*sizeof(double))));
 typedef float vecf __attribute__((vector_size(8*sizeof(float))));
diff --git a/gcc/testsuite/g++.dg/torture/pr38565.C b/gcc/testsuite/g++.dg/torture/pr38565.C
index 7216b1c..412a7a1 100644
--- a/gcc/testsuite/g++.dg/torture/pr38565.C
+++ b/gcc/testsuite/g++.dg/torture/pr38565.C
@@ -1,7 +1,6 @@ 
 // { dg-do compile }
-// Ignore warning on some powerpc-linux configurations.
-// { dg-prune-output "non-standard ABI extension" }
-// { dg-prune-output "changes the ABI" }
+// { dg-additional-options "-Wno-psabi" }
+
 #define vector __attribute__((vector_size(16) ))
 vector unsigned int f(int a)
 {
diff --git a/gcc/testsuite/g++.dg/torture/pr63419.C b/gcc/testsuite/g++.dg/torture/pr63419.C
index 6d4c074..3f5c865 100644
--- a/gcc/testsuite/g++.dg/torture/pr63419.C
+++ b/gcc/testsuite/g++.dg/torture/pr63419.C
@@ -1,7 +1,5 @@ 
 // { dg-do compile }
 // { dg-additional-options "-Wno-psabi" }
-// Ignore warning on some powerpc-linux configurations.
-// { dg-prune-output "non-standard ABI extension" }
 
 typedef float __m128 __attribute__ ((__vector_size__ (16)));
 const int a = 0;
diff --git a/gcc/testsuite/gcc.dg/Wstrict-aliasing-bogus-ref-all-2.c b/gcc/testsuite/gcc.dg/Wstrict-aliasing-bogus-ref-all-2.c
index b1bee33..1fa8a50 100644
--- 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" } */
 
 typedef long long __m128i __attribute__ ((__vector_size__ (16), __may_alias__));
 
@@ -23,6 +24,3 @@  __m128i get_vec(void)
 
   return ret;
 }
-
-/* Ignore a warning that is irrelevant to the purpose of this test.  */
-/* { dg-prune-output ".*GCC vector returned by reference.*" } */
diff --git a/gcc/testsuite/gcc.dg/plugin/diagnostic-test-expressions-1.c b/gcc/testsuite/gcc.dg/plugin/diagnostic-test-expressions-1.c
index 9372936..9006b77 100644
--- 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" } */
 
 /* This is a collection of unittests to verify that we're correctly
    capturing the source code ranges of various kinds of expression.
diff --git a/gcc/testsuite/gcc.dg/pr34856.c b/gcc/testsuite/gcc.dg/pr34856.c
index 62041e2..d2aefc2 100644
--- 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 } } } */
 
@@ -27,6 +27,3 @@  void f1 (unsigned ctr)
     }
   while (ctr);
 }
-
-/* Ignore a warning that is irrelevant to the purpose of this test.  */
-/* { dg-prune-output ".*GCC vector passed by reference.*" } */
diff --git a/gcc/testsuite/gcc.dg/pr35442.c b/gcc/testsuite/gcc.dg/pr35442.c
index 6534ba4..17be0d0 100644
--- 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" } */
 
 typedef char A __attribute__ ((vector_size (64)));
 typedef int B __attribute__ ((vector_size (64)));
@@ -10,6 +11,3 @@  foo (A a)
 {
   ((B) a) ();	/* { dg-error "is not a function" } */
 }
-
-/* Ignore a warning that is irrelevant to the purpose of this test.  */
-/* { dg-prune-output "(.*GCC vector passed by reference.*|.*ABI for * passing parameters with.*)" } */
diff --git a/gcc/testsuite/gcc.dg/pr53060.c b/gcc/testsuite/gcc.dg/pr53060.c
index 503f054..e515090 100644
--- a/gcc/testsuite/gcc.dg/pr53060.c
+++ b/gcc/testsuite/gcc.dg/pr53060.c
@@ -1,4 +1,5 @@ 
 /* { dg-do run } */
+/* { dg-additional-options "-Wno-psabi" } */
 
 extern void abort (void);
 
@@ -22,7 +23,3 @@  int main()
   if (i[0] != 3) abort();
   return 0;
 }
-
-/* Ignore a warning that is irrelevant to the purpose of this test.  */
-/* { dg-prune-output ".*GCC vector returned by reference.*" } */
-/* { dg-prune-output "changes the ABI" } */
diff --git a/gcc/testsuite/gcc.dg/pr63594-1.c b/gcc/testsuite/gcc.dg/pr63594-1.c
index b8cd201..8d0ad2e 100644
--- a/gcc/testsuite/gcc.dg/pr63594-1.c
+++ b/gcc/testsuite/gcc.dg/pr63594-1.c
@@ -2,7 +2,6 @@ 
 /* { dg-do compile } */
 /* { dg-options "-O2 -Wno-psabi" } */
 /* { dg-additional-options "-mno-mmx" { target i?86-*-* x86_64-*-* } } */
-/* { dg-prune-output "non-standard ABI extension" } */
 
 #define C1 c
 #define C2 C1, C1
diff --git a/gcc/testsuite/gcc.dg/pr63594-2.c b/gcc/testsuite/gcc.dg/pr63594-2.c
index 5c6bb31..23c11b1 100644
--- a/gcc/testsuite/gcc.dg/pr63594-2.c
+++ b/gcc/testsuite/gcc.dg/pr63594-2.c
@@ -2,7 +2,6 @@ 
 /* { dg-do run } */
 /* { dg-options "-O2 -Wno-psabi" } */
 /* { dg-additional-options "-mno-mmx" { target i?86-*-* x86_64-*-* } } */
-/* { dg-prune-output "non-standard ABI extension" } */
 
 #define C1 c
 #define C2 C1, C1
diff --git a/gcc/testsuite/gcc.dg/pr63914.c b/gcc/testsuite/gcc.dg/pr63914.c
index df8f537..3a4593e 100644
--- 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" } */
 /* { 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" } */
+/* { dg-additional-options "-mno-sse" { target i?86-*-* x86_64-*-* } } */
 /* { dg-require-effective-target scheduling } */
 
 typedef unsigned short u16;
diff --git a/gcc/testsuite/gcc.dg/torture/pr36891.c b/gcc/testsuite/gcc.dg/torture/pr36891.c
index ab58e43..3f32cc5 100644
--- 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" } */
 
 #define __vector __attribute__((vector_size(16) ))
 __vector float f(void);
@@ -18,6 +19,3 @@  void RRB( __vector float vdist, __vector float vx)
    g(pullx);
   }
 }
-
-/* Ignore a warning that is irrelevant to the purpose of this test.  */
-/* { dg-prune-output ".*GCC vector returned by reference.*" } */
diff --git a/gcc/testsuite/gcc.dg/torture/pr70083.c b/gcc/testsuite/gcc.dg/torture/pr70083.c
index f33cb74..19a89ea 100644
--- a/gcc/testsuite/gcc.dg/torture/pr70083.c
+++ b/gcc/testsuite/gcc.dg/torture/pr70083.c
@@ -19,7 +19,3 @@  foo(int u32_0, int u64_0, int u64_1, v16hi v32u16_0, v8si v32u32_0, v4di v32u64_
   v32u32_1 /= (v8si){0x1e7390, v32u16_0[12], ~v32u16_1[2], -u64_0};
   return v32u16_0[4] + v32u16_0[5] + v32u32_0[5] + v32u32_1[6] + v32u64_1[3];
 }
-
-/* Ignore a warning that is irrelevant to the purpose of this test.  */
-/* { dg-prune-output ".*GCC vector passed by reference.*" } */
-
diff --git a/gcc/testsuite/gcc.dg/torture/pr70307.c b/gcc/testsuite/gcc.dg/torture/pr70307.c
index 0e0f146..a7aefb7 100644
--- a/gcc/testsuite/gcc.dg/torture/pr70307.c
+++ b/gcc/testsuite/gcc.dg/torture/pr70307.c
@@ -61,7 +61,3 @@  fn8 (int i)
   struct S s = { .v = (v4si){(1, i++)} == (v4si){(0, 0)} };
   return s.v;
 }
-
-/* Ignore a warning that is irrelevant to the purpose of this test.  */
-/* { dg-prune-output "\[^\n\r\]*GCC vector passed by reference\[^\n\r\]*" } */
-/* { dg-prune-output "\[^\n\r\]*GCC vector returned by reference\[^\n\r\]*" } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/forwprop-35.c b/gcc/testsuite/gcc.dg/tree-ssa/forwprop-35.c
index 79053a2..b34f8fd 100644
--- 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)));
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/pr71179.c b/gcc/testsuite/gcc.dg/tree-ssa/pr71179.c
index 885c643..cc497b5 100644
--- 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__));
 
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)));