diff mbox series

[pushed] testsuite: suppress mangling compatibility aliases

Message ID 20231222001945.3536355-1-jason@redhat.com
State New
Headers show
Series [pushed] testsuite: suppress mangling compatibility aliases | expand

Commit Message

Jason Merrill Dec. 22, 2023, 12:19 a.m. UTC
Tested x86_64-pc-linux-gnu, applying to trunk.

-- 8< --

Recently a mangling test failed on a target with no mangling alias support
because I hadn't updated the expected mangling, but it was still passing on
x86_64-pc-linux-gnu because of the alias for the old mangling.  So let's
avoid these aliases in mangling tests.

gcc/testsuite/ChangeLog:

	* g++.dg/abi/mangle-arm-crypto.C: Specify -fabi-compat-version.
	* g++.dg/abi/mangle-concepts1.C
	* g++.dg/abi/mangle-neon-aarch64.C
	* g++.dg/abi/mangle-neon.C
	* g++.dg/abi/mangle-regparm.C
	* g++.dg/abi/mangle-regparm1a.C
	* g++.dg/abi/mangle-ttp1.C
	* g++.dg/abi/mangle-union1.C
	* g++.dg/abi/mangle1.C
	* g++.dg/abi/mangle13.C
	* g++.dg/abi/mangle15.C
	* g++.dg/abi/mangle16.C
	* g++.dg/abi/mangle18-1.C
	* g++.dg/abi/mangle19-1.C
	* g++.dg/abi/mangle20-1.C
	* g++.dg/abi/mangle22.C
	* g++.dg/abi/mangle23.C
	* g++.dg/abi/mangle24.C
	* g++.dg/abi/mangle25.C
	* g++.dg/abi/mangle26.C
	* g++.dg/abi/mangle27.C
	* g++.dg/abi/mangle28.C
	* g++.dg/abi/mangle29.C
	* g++.dg/abi/mangle3-2.C
	* g++.dg/abi/mangle3.C
	* g++.dg/abi/mangle30.C
	* g++.dg/abi/mangle31.C
	* g++.dg/abi/mangle32.C
	* g++.dg/abi/mangle33.C
	* g++.dg/abi/mangle34.C
	* g++.dg/abi/mangle35.C
	* g++.dg/abi/mangle36.C
	* g++.dg/abi/mangle37.C
	* g++.dg/abi/mangle39.C
	* g++.dg/abi/mangle40.C
	* g++.dg/abi/mangle43.C
	* g++.dg/abi/mangle44.C
	* g++.dg/abi/mangle45.C
	* g++.dg/abi/mangle46.C
	* g++.dg/abi/mangle47.C
	* g++.dg/abi/mangle48.C
	* g++.dg/abi/mangle49.C
	* g++.dg/abi/mangle5.C
	* g++.dg/abi/mangle50.C
	* g++.dg/abi/mangle51.C
	* g++.dg/abi/mangle52.C
	* g++.dg/abi/mangle53.C
	* g++.dg/abi/mangle54.C
	* g++.dg/abi/mangle55.C
	* g++.dg/abi/mangle56.C
	* g++.dg/abi/mangle57.C
	* g++.dg/abi/mangle58.C
	* g++.dg/abi/mangle59.C
	* g++.dg/abi/mangle6.C
	* g++.dg/abi/mangle60.C
	* g++.dg/abi/mangle61.C
	* g++.dg/abi/mangle62.C
	* g++.dg/abi/mangle62a.C
	* g++.dg/abi/mangle63.C
	* g++.dg/abi/mangle64.C
	* g++.dg/abi/mangle65.C
	* g++.dg/abi/mangle66.C
	* g++.dg/abi/mangle68.C
	* g++.dg/abi/mangle69.C
	* g++.dg/abi/mangle7.C
	* g++.dg/abi/mangle70.C
	* g++.dg/abi/mangle71.C
	* g++.dg/abi/mangle72.C
	* g++.dg/abi/mangle73.C
	* g++.dg/abi/mangle74.C
	* g++.dg/abi/mangle75.C
	* g++.dg/abi/mangle76.C
	* g++.dg/abi/mangle77.C
	* g++.dg/abi/mangle78.C
	* g++.dg/abi/mangle8.C
	* g++.dg/abi/mangle9.C: Likewise.
---
 gcc/testsuite/g++.dg/abi/mangle-arm-crypto.C   | 1 +
 gcc/testsuite/g++.dg/abi/mangle-concepts1.C    | 1 +
 gcc/testsuite/g++.dg/abi/mangle-neon-aarch64.C | 1 +
 gcc/testsuite/g++.dg/abi/mangle-neon.C         | 1 +
 gcc/testsuite/g++.dg/abi/mangle-regparm.C      | 2 +-
 gcc/testsuite/g++.dg/abi/mangle-regparm1a.C    | 2 +-
 gcc/testsuite/g++.dg/abi/mangle-ttp1.C         | 1 +
 gcc/testsuite/g++.dg/abi/mangle-union1.C       | 1 +
 gcc/testsuite/g++.dg/abi/mangle1.C             | 2 +-
 gcc/testsuite/g++.dg/abi/mangle13.C            | 2 +-
 gcc/testsuite/g++.dg/abi/mangle15.C            | 2 +-
 gcc/testsuite/g++.dg/abi/mangle16.C            | 2 +-
 gcc/testsuite/g++.dg/abi/mangle18-1.C          | 2 +-
 gcc/testsuite/g++.dg/abi/mangle19-1.C          | 2 +-
 gcc/testsuite/g++.dg/abi/mangle20-1.C          | 2 +-
 gcc/testsuite/g++.dg/abi/mangle22.C            | 2 +-
 gcc/testsuite/g++.dg/abi/mangle23.C            | 2 +-
 gcc/testsuite/g++.dg/abi/mangle24.C            | 2 +-
 gcc/testsuite/g++.dg/abi/mangle25.C            | 2 +-
 gcc/testsuite/g++.dg/abi/mangle26.C            | 2 +-
 gcc/testsuite/g++.dg/abi/mangle27.C            | 2 +-
 gcc/testsuite/g++.dg/abi/mangle28.C            | 2 +-
 gcc/testsuite/g++.dg/abi/mangle29.C            | 2 +-
 gcc/testsuite/g++.dg/abi/mangle3-2.C           | 2 +-
 gcc/testsuite/g++.dg/abi/mangle3.C             | 2 +-
 gcc/testsuite/g++.dg/abi/mangle30.C            | 1 +
 gcc/testsuite/g++.dg/abi/mangle31.C            | 1 +
 gcc/testsuite/g++.dg/abi/mangle32.C            | 1 +
 gcc/testsuite/g++.dg/abi/mangle33.C            | 1 +
 gcc/testsuite/g++.dg/abi/mangle34.C            | 1 +
 gcc/testsuite/g++.dg/abi/mangle35.C            | 1 +
 gcc/testsuite/g++.dg/abi/mangle36.C            | 2 +-
 gcc/testsuite/g++.dg/abi/mangle37.C            | 2 +-
 gcc/testsuite/g++.dg/abi/mangle39.C            | 2 +-
 gcc/testsuite/g++.dg/abi/mangle40.C            | 2 +-
 gcc/testsuite/g++.dg/abi/mangle43.C            | 2 +-
 gcc/testsuite/g++.dg/abi/mangle44.C            | 1 +
 gcc/testsuite/g++.dg/abi/mangle45.C            | 2 +-
 gcc/testsuite/g++.dg/abi/mangle46.C            | 2 +-
 gcc/testsuite/g++.dg/abi/mangle47.C            | 1 +
 gcc/testsuite/g++.dg/abi/mangle48.C            | 1 +
 gcc/testsuite/g++.dg/abi/mangle49.C            | 2 +-
 gcc/testsuite/g++.dg/abi/mangle5.C             | 1 +
 gcc/testsuite/g++.dg/abi/mangle50.C            | 1 +
 gcc/testsuite/g++.dg/abi/mangle51.C            | 2 +-
 gcc/testsuite/g++.dg/abi/mangle52.C            | 2 +-
 gcc/testsuite/g++.dg/abi/mangle53.C            | 1 +
 gcc/testsuite/g++.dg/abi/mangle54.C            | 2 +-
 gcc/testsuite/g++.dg/abi/mangle55.C            | 1 +
 gcc/testsuite/g++.dg/abi/mangle56.C            | 1 +
 gcc/testsuite/g++.dg/abi/mangle57.C            | 2 +-
 gcc/testsuite/g++.dg/abi/mangle58.C            | 2 +-
 gcc/testsuite/g++.dg/abi/mangle59.C            | 2 +-
 gcc/testsuite/g++.dg/abi/mangle6.C             | 1 +
 gcc/testsuite/g++.dg/abi/mangle60.C            | 2 +-
 gcc/testsuite/g++.dg/abi/mangle61.C            | 1 +
 gcc/testsuite/g++.dg/abi/mangle62.C            | 2 +-
 gcc/testsuite/g++.dg/abi/mangle62a.C           | 2 +-
 gcc/testsuite/g++.dg/abi/mangle63.C            | 1 +
 gcc/testsuite/g++.dg/abi/mangle64.C            | 2 +-
 gcc/testsuite/g++.dg/abi/mangle65.C            | 1 +
 gcc/testsuite/g++.dg/abi/mangle66.C            | 1 +
 gcc/testsuite/g++.dg/abi/mangle68.C            | 1 +
 gcc/testsuite/g++.dg/abi/mangle69.C            | 1 +
 gcc/testsuite/g++.dg/abi/mangle7.C             | 1 +
 gcc/testsuite/g++.dg/abi/mangle70.C            | 1 +
 gcc/testsuite/g++.dg/abi/mangle71.C            | 1 +
 gcc/testsuite/g++.dg/abi/mangle72.C            | 1 +
 gcc/testsuite/g++.dg/abi/mangle73.C            | 1 +
 gcc/testsuite/g++.dg/abi/mangle74.C            | 2 +-
 gcc/testsuite/g++.dg/abi/mangle75.C            | 1 +
 gcc/testsuite/g++.dg/abi/mangle76.C            | 2 +-
 gcc/testsuite/g++.dg/abi/mangle77.C            | 1 +
 gcc/testsuite/g++.dg/abi/mangle78.C            | 1 +
 gcc/testsuite/g++.dg/abi/mangle8.C             | 1 +
 gcc/testsuite/g++.dg/abi/mangle9.C             | 2 +-
 76 files changed, 76 insertions(+), 40 deletions(-)


base-commit: cdfaa4aa52752e55d27bb068b6de933d17b176d3
diff mbox series

Patch

diff --git a/gcc/testsuite/g++.dg/abi/mangle-arm-crypto.C b/gcc/testsuite/g++.dg/abi/mangle-arm-crypto.C
index f3fb1a96601..1d3f832f8a1 100644
--- a/gcc/testsuite/g++.dg/abi/mangle-arm-crypto.C
+++ b/gcc/testsuite/g++.dg/abi/mangle-arm-crypto.C
@@ -4,6 +4,7 @@ 
 // { dg-do compile }
 // { dg-require-effective-target arm_crypto_ok }
 // { dg-add-options arm_crypto }
+// { dg-additional-options -fabi-compat-version=0 }
 
 #include <arm_neon.h>
 
diff --git a/gcc/testsuite/g++.dg/abi/mangle-concepts1.C b/gcc/testsuite/g++.dg/abi/mangle-concepts1.C
index eac520cef3c..cb3396b663a 100644
--- a/gcc/testsuite/g++.dg/abi/mangle-concepts1.C
+++ b/gcc/testsuite/g++.dg/abi/mangle-concepts1.C
@@ -1,4 +1,5 @@ 
 // { dg-do compile { target c++20 } }
+// { dg-additional-options -fabi-compat-version=0 }
 
 template <class T> concept C = true;
 template <class T, class U> concept C2 = true;
diff --git a/gcc/testsuite/g++.dg/abi/mangle-neon-aarch64.C b/gcc/testsuite/g++.dg/abi/mangle-neon-aarch64.C
index 50c1452ed83..b62cf5dd49e 100644
--- a/gcc/testsuite/g++.dg/abi/mangle-neon-aarch64.C
+++ b/gcc/testsuite/g++.dg/abi/mangle-neon-aarch64.C
@@ -2,6 +2,7 @@ 
 // correctly.
 
 // { dg-do compile { target { aarch64*-*-* } } }
+// { dg-additional-options -fabi-compat-version=0 }
 
 #include <arm_neon.h>
 
diff --git a/gcc/testsuite/g++.dg/abi/mangle-neon.C b/gcc/testsuite/g++.dg/abi/mangle-neon.C
index 57a9db26922..1ab51d5a78a 100644
--- a/gcc/testsuite/g++.dg/abi/mangle-neon.C
+++ b/gcc/testsuite/g++.dg/abi/mangle-neon.C
@@ -3,6 +3,7 @@ 
 // { dg-do compile }
 // { dg-require-effective-target arm_neon_ok }
 // { dg-add-options arm_neon }
+// { dg-additional-options -fabi-compat-version=0 }
 
 #include <arm_neon.h>
 
diff --git a/gcc/testsuite/g++.dg/abi/mangle-regparm.C b/gcc/testsuite/g++.dg/abi/mangle-regparm.C
index 361e38bd3f3..480b5fa6f1d 100644
--- a/gcc/testsuite/g++.dg/abi/mangle-regparm.C
+++ b/gcc/testsuite/g++.dg/abi/mangle-regparm.C
@@ -1,5 +1,5 @@ 
 // { dg-do run { target { { i?86-*-* x86_64-*-* } && ia32 } } }
-// { dg-options "-Wabi=8 -save-temps" }
+// { dg-options "-Wabi=8 -save-temps -fabi-compat-version=0" }
 // { dg-final { scan-assembler "_Z18IndirectExternCallIPU7stdcallU7regparmILi3EEFviiEiEvT_T0_S3_" } }
 
 typedef __SIZE_TYPE__ size_t;
diff --git a/gcc/testsuite/g++.dg/abi/mangle-regparm1a.C b/gcc/testsuite/g++.dg/abi/mangle-regparm1a.C
index bfa6c9b0039..60ac51e1ff3 100644
--- a/gcc/testsuite/g++.dg/abi/mangle-regparm1a.C
+++ b/gcc/testsuite/g++.dg/abi/mangle-regparm1a.C
@@ -1,5 +1,5 @@ 
 // { dg-do run { target { { i?86-*-* x86_64-*-* } && ia32 } } }
-// { dg-options "-fabi-version=8 -Wabi -save-temps" }
+// { dg-options "-fabi-version=8 -fabi-compat-version=8 -Wabi -save-temps" }
 // { dg-final { scan-assembler "_Z18IndirectExternCallIPFviiEiEvT_T0_S3_" } }
 
 template <typename F, typename T>
diff --git a/gcc/testsuite/g++.dg/abi/mangle-ttp1.C b/gcc/testsuite/g++.dg/abi/mangle-ttp1.C
index 2f5878fc3fe..0c3660dd79e 100644
--- a/gcc/testsuite/g++.dg/abi/mangle-ttp1.C
+++ b/gcc/testsuite/g++.dg/abi/mangle-ttp1.C
@@ -1,5 +1,6 @@ 
 // ABI #47 "natural" template parameter mangling
 // { dg-do compile { target c++17 } }
+// { dg-additional-options -fabi-compat-version=0 }
 
 template <template <class...> class TT> class A { };
 template <int... T> class B { };
diff --git a/gcc/testsuite/g++.dg/abi/mangle-union1.C b/gcc/testsuite/g++.dg/abi/mangle-union1.C
index f2ee4576adf..0cd3a9e371c 100644
--- a/gcc/testsuite/g++.dg/abi/mangle-union1.C
+++ b/gcc/testsuite/g++.dg/abi/mangle-union1.C
@@ -1,5 +1,6 @@ 
 // PR c++/104847
 // { dg-do compile { target c++11 } }
+// { dg-additional-options -fabi-compat-version=0 }
 
 struct S { int i; };
 union U { S k; };
diff --git a/gcc/testsuite/g++.dg/abi/mangle1.C b/gcc/testsuite/g++.dg/abi/mangle1.C
index ab377d13b4e..40bb9a9e2fc 100644
--- a/gcc/testsuite/g++.dg/abi/mangle1.C
+++ b/gcc/testsuite/g++.dg/abi/mangle1.C
@@ -1,7 +1,7 @@ 
 // Test for mangling of simple testcase involving construction vtables.
 
 // { dg-do compile }
-// { dg-options "-fno-inline" }
+// { dg-options "-fno-inline -fabi-compat-version=0" }
 
 struct A {
   virtual void f () { }
diff --git a/gcc/testsuite/g++.dg/abi/mangle13.C b/gcc/testsuite/g++.dg/abi/mangle13.C
index c8822a34039..de1bef58ece 100644
--- a/gcc/testsuite/g++.dg/abi/mangle13.C
+++ b/gcc/testsuite/g++.dg/abi/mangle13.C
@@ -1,4 +1,4 @@ 
-// { dg-options "-fabi-version=10" }
+// { dg-options "-fabi-version=10 -fabi-compat-version=10" }
 
 struct A {
   template <typename T> int f ();
diff --git a/gcc/testsuite/g++.dg/abi/mangle15.C b/gcc/testsuite/g++.dg/abi/mangle15.C
index 3c112e263f0..b143c78ffc2 100644
--- a/gcc/testsuite/g++.dg/abi/mangle15.C
+++ b/gcc/testsuite/g++.dg/abi/mangle15.C
@@ -1,5 +1,5 @@ 
 // { dg-do compile }
-// { dg-options "-fabi-version=0" }
+// { dg-options "-fabi-version=0 -fabi-compat-version=0" }
 
 struct A {
   template <typename T> int f ();
diff --git a/gcc/testsuite/g++.dg/abi/mangle16.C b/gcc/testsuite/g++.dg/abi/mangle16.C
index 1f3039f8682..b96de711980 100644
--- a/gcc/testsuite/g++.dg/abi/mangle16.C
+++ b/gcc/testsuite/g++.dg/abi/mangle16.C
@@ -1,4 +1,4 @@ 
-// { dg-options "-fabi-version=0" }
+// { dg-options "-fabi-version=0 -fabi-compat-version=0" }
 
 enum E { e = 3 };
 
diff --git a/gcc/testsuite/g++.dg/abi/mangle18-1.C b/gcc/testsuite/g++.dg/abi/mangle18-1.C
index a1be5e48c33..86b1305d248 100644
--- a/gcc/testsuite/g++.dg/abi/mangle18-1.C
+++ b/gcc/testsuite/g++.dg/abi/mangle18-1.C
@@ -1,5 +1,5 @@ 
 // { dg-do compile }
-// { dg-options "-fabi-version=2" }
+// { dg-options "-fabi-version=2 -fabi-compat-version=2" }
 
 // Copyright (C) 2003 Free Software Foundation, Inc.
 // Contributed by Nathan Sidwell 30 Nov 2003 <nathan@codesourcery.com>
diff --git a/gcc/testsuite/g++.dg/abi/mangle19-1.C b/gcc/testsuite/g++.dg/abi/mangle19-1.C
index a888173304b..3f98a727de2 100644
--- a/gcc/testsuite/g++.dg/abi/mangle19-1.C
+++ b/gcc/testsuite/g++.dg/abi/mangle19-1.C
@@ -1,5 +1,5 @@ 
 // { dg-do compile }
-// { dg-options "-fabi-version=2 -Wabi" }
+// { dg-options "-fabi-version=2 -fabi-compat-version=2 -Wabi=0" }
 
 // Copyright (C) 2003 Free Software Foundation, Inc.
 // Contributed by Nathan Sidwell 15 Dec 2003 <nathan@codesourcery.com>
diff --git a/gcc/testsuite/g++.dg/abi/mangle20-1.C b/gcc/testsuite/g++.dg/abi/mangle20-1.C
index 1985fe3c941..4e0294f024f 100644
--- a/gcc/testsuite/g++.dg/abi/mangle20-1.C
+++ b/gcc/testsuite/g++.dg/abi/mangle20-1.C
@@ -1,5 +1,5 @@ 
 // { dg-do compile }
-// { dg-options "-fabi-version=2" }
+// { dg-options "-fabi-version=2 -fabi-compat-version=2" }
 
 // Copyright (C) 2003 Free Software Foundation, Inc.
 // Contributed by Nathan Sidwell 15 Dec 2003 <nathan@codesourcery.com>
diff --git a/gcc/testsuite/g++.dg/abi/mangle22.C b/gcc/testsuite/g++.dg/abi/mangle22.C
index 93ddd1e8740..63865578f45 100644
--- a/gcc/testsuite/g++.dg/abi/mangle22.C
+++ b/gcc/testsuite/g++.dg/abi/mangle22.C
@@ -1,5 +1,5 @@ 
 // PR c++/16240
-// { dg-options "-fabi-version=3" }
+// { dg-options "-fabi-version=3 -fabi-compat-version=3" }
 
 void foo(char);
 template<void (&)(char)> struct CB {};
diff --git a/gcc/testsuite/g++.dg/abi/mangle23.C b/gcc/testsuite/g++.dg/abi/mangle23.C
index f22347a0490..7e3e9883adf 100644
--- a/gcc/testsuite/g++.dg/abi/mangle23.C
+++ b/gcc/testsuite/g++.dg/abi/mangle23.C
@@ -1,5 +1,5 @@ 
 // PR c++/16240
-// { dg-options "-fabi-version=2 -Wno-abi" }
+// { dg-options "-fabi-version=2 -fabi-compat-version=2 -Wno-abi" }
 
 void foo(char);
 template<void (&)(char)> struct CB {};
diff --git a/gcc/testsuite/g++.dg/abi/mangle24.C b/gcc/testsuite/g++.dg/abi/mangle24.C
index 1f5c5c1c3de..52c0a42244d 100644
--- a/gcc/testsuite/g++.dg/abi/mangle24.C
+++ b/gcc/testsuite/g++.dg/abi/mangle24.C
@@ -4,7 +4,7 @@ 
 // ia64-hpux where "long double" is "e" and __float80 is "u9__float80".
 // Origin: Joseph Myers <joseph@codesourcery.com>
 // { dg-do compile { target i?86-*-* x86_64-*-* ia64-*-* } }
-// { dg-options "" }
+// { dg-options "-fabi-compat-version=0" }
 // { dg-final { scan-assembler "_Z1fe" { target i?86-*-* x86_64-*-* } } }
 // { dg-final { scan-assembler "_Z1fe" { target { ia64-*-* && { ! "ia64-*-hpux*" } } } } }
 // { dg-final { scan-assembler "_Z1fu9__float80" { target ia64-*-hpux* } } }
diff --git a/gcc/testsuite/g++.dg/abi/mangle25.C b/gcc/testsuite/g++.dg/abi/mangle25.C
index 74397f778cc..8b41fc1521e 100644
--- a/gcc/testsuite/g++.dg/abi/mangle25.C
+++ b/gcc/testsuite/g++.dg/abi/mangle25.C
@@ -5,7 +5,7 @@ 
 // "long double".
 // Origin: Joseph Myers <joseph@codesourcery.com>
 // { dg-do compile { target ia64-*-* i?86-*-* x86_64-*-* } }
-// { dg-options "" }
+// { dg-options "-fabi-compat-version=0" }
 // { dg-final { scan-assembler "_Z1fg" { target i?86-*-* x86_64-*-* } } }
 // { dg-final { scan-assembler "_Z1fg" { target { ia64-*-* && { ! "ia64-*-hpux*" } } } } }
 // { dg-final { scan-assembler "_Z1fe" { target ia64-*-hpux* } } }
diff --git a/gcc/testsuite/g++.dg/abi/mangle26.C b/gcc/testsuite/g++.dg/abi/mangle26.C
index 2041d778b9a..f738dd7a4cc 100644
--- a/gcc/testsuite/g++.dg/abi/mangle26.C
+++ b/gcc/testsuite/g++.dg/abi/mangle26.C
@@ -1,7 +1,7 @@ 
 // Test of std mangling
 
 // { dg-do compile }
-// { dg-options "-fno-inline -fno-implicit-constexpr" }
+// { dg-options "-fno-inline -fno-implicit-constexpr -fabi-compat-version=0" }
 
 namespace std {
   struct A {
diff --git a/gcc/testsuite/g++.dg/abi/mangle27.C b/gcc/testsuite/g++.dg/abi/mangle27.C
index 2d15abbf961..c6714eabdeb 100644
--- a/gcc/testsuite/g++.dg/abi/mangle27.C
+++ b/gcc/testsuite/g++.dg/abi/mangle27.C
@@ -1,7 +1,7 @@ 
 // Test of std::basic_iostream<char, std::char_traits<char> > mangling
 
 // { dg-do compile }
-// { dg-options "-fno-inline" }
+// { dg-options "-fno-inline -fabi-compat-version=0" }
 
 namespace std {
   template<typename> struct char_traits;
diff --git a/gcc/testsuite/g++.dg/abi/mangle28.C b/gcc/testsuite/g++.dg/abi/mangle28.C
index bea8ce01974..7168c0d27ba 100644
--- a/gcc/testsuite/g++.dg/abi/mangle28.C
+++ b/gcc/testsuite/g++.dg/abi/mangle28.C
@@ -1,7 +1,7 @@ 
 // Test of std::basic_istream<char, std::char_traits<char> > mangling
 
 // { dg-do compile }
-// { dg-options "-fno-inline" }
+// { dg-options "-fno-inline -fabi-compat-version=0" }
 
 namespace std {
   template<typename> struct char_traits;
diff --git a/gcc/testsuite/g++.dg/abi/mangle29.C b/gcc/testsuite/g++.dg/abi/mangle29.C
index aaff2b4eb68..9e1da9f4fbb 100644
--- a/gcc/testsuite/g++.dg/abi/mangle29.C
+++ b/gcc/testsuite/g++.dg/abi/mangle29.C
@@ -1,7 +1,7 @@ 
 // Test of std::basic_ostream<char, std::char_traits<char> > mangling
 
 // { dg-do compile }
-// { dg-options "-fno-inline" }
+// { dg-options "-fno-inline -fabi-compat-version=0" }
 
 namespace std {
   template<typename> struct char_traits;
diff --git a/gcc/testsuite/g++.dg/abi/mangle3-2.C b/gcc/testsuite/g++.dg/abi/mangle3-2.C
index 538c5cbfae2..7ef000564d5 100644
--- a/gcc/testsuite/g++.dg/abi/mangle3-2.C
+++ b/gcc/testsuite/g++.dg/abi/mangle3-2.C
@@ -1,5 +1,5 @@ 
 // Test mangling of type casts
-// { dg-options "-fabi-version=0 -Wabi=5" }
+// { dg-options "-fabi-version=0 -fabi-compat-version=0 -Wabi=5" }
 // { dg-do compile }
 
 template<int i> class A {};
diff --git a/gcc/testsuite/g++.dg/abi/mangle3.C b/gcc/testsuite/g++.dg/abi/mangle3.C
index 42f8deac537..ee9a92a5c8b 100644
--- a/gcc/testsuite/g++.dg/abi/mangle3.C
+++ b/gcc/testsuite/g++.dg/abi/mangle3.C
@@ -1,5 +1,5 @@ 
 // Test mangling of type casts
-// { dg-options "-fabi-version=2 -Wabi" }
+// { dg-options "-fabi-version=2 -fabi-compat-version=2 -Wabi=0" }
 // { dg-do compile }
 
 template<int i> class A {};
diff --git a/gcc/testsuite/g++.dg/abi/mangle30.C b/gcc/testsuite/g++.dg/abi/mangle30.C
index f0b83dbe929..af92f611e26 100644
--- a/gcc/testsuite/g++.dg/abi/mangle30.C
+++ b/gcc/testsuite/g++.dg/abi/mangle30.C
@@ -1,4 +1,5 @@ 
 // Test for mangling of template args in a typename type.
+// { dg-additional-options -fabi-compat-version=0 }
 
 struct A
 {
diff --git a/gcc/testsuite/g++.dg/abi/mangle31.C b/gcc/testsuite/g++.dg/abi/mangle31.C
index 4be2e0b03fc..165260dd063 100644
--- a/gcc/testsuite/g++.dg/abi/mangle31.C
+++ b/gcc/testsuite/g++.dg/abi/mangle31.C
@@ -1,5 +1,6 @@ 
 // PR c++/39095
 // { dg-do compile }
+// { dg-additional-options -fabi-compat-version=0 }
 
 struct B
 {
diff --git a/gcc/testsuite/g++.dg/abi/mangle32.C b/gcc/testsuite/g++.dg/abi/mangle32.C
index 6ae0113a27b..4c5b33b8b4d 100644
--- a/gcc/testsuite/g++.dg/abi/mangle32.C
+++ b/gcc/testsuite/g++.dg/abi/mangle32.C
@@ -4,6 +4,7 @@ 
 // are distinct.
 
 // { dg-do compile { target c++11 } }
+// { dg-additional-options -fabi-compat-version=0 }
 
 typedef struct { } *A;
 typedef struct { } *B;
diff --git a/gcc/testsuite/g++.dg/abi/mangle33.C b/gcc/testsuite/g++.dg/abi/mangle33.C
index 8c77f1f0d09..1b1f89833fe 100644
--- a/gcc/testsuite/g++.dg/abi/mangle33.C
+++ b/gcc/testsuite/g++.dg/abi/mangle33.C
@@ -1,4 +1,5 @@ 
 // Testcase for mangling very long names.
+// { dg-additional-options -fabi-compat-version=0 }
 
 #define N \
 abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklm
diff --git a/gcc/testsuite/g++.dg/abi/mangle34.C b/gcc/testsuite/g++.dg/abi/mangle34.C
index 08c3bc0a19b..bee16b0c828 100644
--- a/gcc/testsuite/g++.dg/abi/mangle34.C
+++ b/gcc/testsuite/g++.dg/abi/mangle34.C
@@ -4,6 +4,7 @@ 
 // This tests the mangling of empty template argument list in a template
 // id.
 // { dg-final { scan-assembler "_ZNK5DummyclI3GenEENT_3SigIE10ResultTypeERKS2_" } }
+// { dg-additional-options -fabi-compat-version=0 }
 
 
 struct Void {};
diff --git a/gcc/testsuite/g++.dg/abi/mangle35.C b/gcc/testsuite/g++.dg/abi/mangle35.C
index 78d99334488..a279227a545 100644
--- a/gcc/testsuite/g++.dg/abi/mangle35.C
+++ b/gcc/testsuite/g++.dg/abi/mangle35.C
@@ -1,5 +1,6 @@ 
 // PR c++/38600
 // { dg-final { scan-assembler "_Z3barIiE1AIX3fooIT_EEEv" } }
+// { dg-additional-options -fabi-compat-version=0 }
 
 template<void (*)()> struct A {};
 
diff --git a/gcc/testsuite/g++.dg/abi/mangle36.C b/gcc/testsuite/g++.dg/abi/mangle36.C
index aaace6570a2..1acfc879b96 100644
--- a/gcc/testsuite/g++.dg/abi/mangle36.C
+++ b/gcc/testsuite/g++.dg/abi/mangle36.C
@@ -1,6 +1,6 @@ 
 // PR c++/41959
 // { dg-do compile { target i?86-*-* x86_64-*-* } }
-// { dg-options "-mavx -fabi-version=4" }
+// { dg-options "-mavx -fabi-version=4 -fabi-compat-version=4" }
 // { dg-final { scan-assembler "_Z1fDv4_f" } }
 // { dg-final { scan-assembler "_Z1fDv8_f" } }
 
diff --git a/gcc/testsuite/g++.dg/abi/mangle37.C b/gcc/testsuite/g++.dg/abi/mangle37.C
index 4dd87e84c10..c6f70d78f46 100644
--- a/gcc/testsuite/g++.dg/abi/mangle37.C
+++ b/gcc/testsuite/g++.dg/abi/mangle37.C
@@ -1,6 +1,6 @@ 
 // Testcase for mangling of expressions involving operator names.
 // { dg-do compile { target c++11 } }
-// { dg-options "-fabi-version=10" }
+// { dg-options "-fabi-version=10 -fabi-compat-version=10" }
 // { dg-final { scan-assembler "_Z1fI1AEDTclonplfp_fp_EET_" } }
 // { dg-final { scan-assembler "_Z1gI1AEDTclonplIT_Efp_fp_EES1_" } }
 // { dg-final { scan-assembler "_Z1hI1AEDTcldtfp_miEET_" } }
diff --git a/gcc/testsuite/g++.dg/abi/mangle39.C b/gcc/testsuite/g++.dg/abi/mangle39.C
index a36f98127cc..520edc250b6 100644
--- a/gcc/testsuite/g++.dg/abi/mangle39.C
+++ b/gcc/testsuite/g++.dg/abi/mangle39.C
@@ -1,6 +1,6 @@ 
 // PR c++/42338
 // { dg-do compile { target c++11 } }
-// { dg-options "-fabi-version=5" }
+// { dg-options "-fabi-version=5 -fabi-compat-version=5" }
 // { dg-final { scan-assembler "_Z1fIPiEDTcmppfp_Li0EET_" } }
 // { dg-final { scan-assembler "_Z1gIiEvRK1AIT_EDTixfL0p_Li0EE" } }
 
diff --git a/gcc/testsuite/g++.dg/abi/mangle40.C b/gcc/testsuite/g++.dg/abi/mangle40.C
index a7032a0b24c..898565ac572 100644
--- a/gcc/testsuite/g++.dg/abi/mangle40.C
+++ b/gcc/testsuite/g++.dg/abi/mangle40.C
@@ -2,7 +2,7 @@ 
 // { dg-do compile { target i?86-*-* x86_64-*-* } }
 // { dg-require-weak "" }
 // { dg-require-alias "" }
-// { dg-options "-mavx -Wabi -fabi-version=2" }
+// { dg-options "-mavx -Wabi -fabi-version=2 -fabi-compat-version=0" }
 // { dg-final { scan-assembler "(weak|glob)\[^\n\]*_Z1fIDv4_fEvT_" } }
 // { dg-final { scan-assembler "(weak|glob)\[^\n\]*_Z1fIU8__vectorfEvT_" } }
 // { dg-final { scan-assembler "(weak|glob)\[^\n\]*_ZN1AIDv4_fE1tE" } }
diff --git a/gcc/testsuite/g++.dg/abi/mangle43.C b/gcc/testsuite/g++.dg/abi/mangle43.C
index 4dfa425f6cd..76b5ba463a0 100644
--- a/gcc/testsuite/g++.dg/abi/mangle43.C
+++ b/gcc/testsuite/g++.dg/abi/mangle43.C
@@ -1,5 +1,5 @@ 
 // { dg-do compile { target int128 } }
-// { dg-options "" }
+// { dg-options "-fabi-compat-version=0" }
 
 struct S {
   S(void) { m_i128 = 0; m_u128 = 0; }
diff --git a/gcc/testsuite/g++.dg/abi/mangle44.C b/gcc/testsuite/g++.dg/abi/mangle44.C
index 8454148421c..73957e117c9 100644
--- a/gcc/testsuite/g++.dg/abi/mangle44.C
+++ b/gcc/testsuite/g++.dg/abi/mangle44.C
@@ -1,4 +1,5 @@ 
 // PR c++/45008
+// { dg-additional-options -fabi-compat-version=0 }
 
 template <typename T>
 struct A
diff --git a/gcc/testsuite/g++.dg/abi/mangle45.C b/gcc/testsuite/g++.dg/abi/mangle45.C
index bdedb0ab3b3..52cdadde9e1 100644
--- a/gcc/testsuite/g++.dg/abi/mangle45.C
+++ b/gcc/testsuite/g++.dg/abi/mangle45.C
@@ -1,6 +1,6 @@ 
 // Testcase for mangling of parameters used other than in a trailing return type
 // { dg-do compile { target c++11 } }
-// { dg-options "-fabi-version=5 -Wabi=4" }
+// { dg-options "-fabi-version=5 -fabi-compat-version=5 -Wabi=4" }
 
 template<class T> void f(T p, decltype(p)) { }	     // L = 1 { dg-warning "mangle" }
 template<class T> void g(T p, decltype(p) (*)()) { } // L = 1 { dg-warning "mangle" }
diff --git a/gcc/testsuite/g++.dg/abi/mangle46.C b/gcc/testsuite/g++.dg/abi/mangle46.C
index fddc88d0ad4..2986dd7354b 100644
--- a/gcc/testsuite/g++.dg/abi/mangle46.C
+++ b/gcc/testsuite/g++.dg/abi/mangle46.C
@@ -1,5 +1,5 @@ 
 // PR c++/48008
-// { dg-options -fabi-version=5 }
+// { dg-options "-fabi-version=5 -fabi-compat-version=5" }
 // Test that we retain function-cv-quals in template argument mangling.
 
 template <class T>
diff --git a/gcc/testsuite/g++.dg/abi/mangle47.C b/gcc/testsuite/g++.dg/abi/mangle47.C
index 3bb5e9ab7e3..09d822ea623 100644
--- a/gcc/testsuite/g++.dg/abi/mangle47.C
+++ b/gcc/testsuite/g++.dg/abi/mangle47.C
@@ -1,6 +1,7 @@ 
 // PR c++/47132
 // { dg-do compile { target c++11 } }
 // { dg-final { scan-assembler "_Z1fIiEDToRfp_Li1EET_" } }
+// { dg-additional-options -fabi-compat-version=0 }
 
 template <typename T>
 auto f (T t) -> decltype(t |= 1);
diff --git a/gcc/testsuite/g++.dg/abi/mangle48.C b/gcc/testsuite/g++.dg/abi/mangle48.C
index f9afa1ad0b2..3f86c516d13 100644
--- a/gcc/testsuite/g++.dg/abi/mangle48.C
+++ b/gcc/testsuite/g++.dg/abi/mangle48.C
@@ -1,5 +1,6 @@ 
 // Testcase for 'this' mangling
 // { dg-do compile { target c++11 } }
+// { dg-additional-options -fabi-compat-version=0 }
 
 struct B
 {
diff --git a/gcc/testsuite/g++.dg/abi/mangle49.C b/gcc/testsuite/g++.dg/abi/mangle49.C
index fae013a2635..756373696c7 100644
--- a/gcc/testsuite/g++.dg/abi/mangle49.C
+++ b/gcc/testsuite/g++.dg/abi/mangle49.C
@@ -1,6 +1,6 @@ 
 // PR c++/49932
 // { dg-do compile { target c++11 } }
-// { dg-options "-fabi-version=0 -Wabi=2" }
+// { dg-options "-fabi-version=0 -fabi-compat-version=0 -Wabi=2" }
 
 template < typename T >
 auto
diff --git a/gcc/testsuite/g++.dg/abi/mangle5.C b/gcc/testsuite/g++.dg/abi/mangle5.C
index 99a08730fba..e0e08485eeb 100644
--- a/gcc/testsuite/g++.dg/abi/mangle5.C
+++ b/gcc/testsuite/g++.dg/abi/mangle5.C
@@ -1,4 +1,5 @@ 
 // Test mangling of pointers to cv-qualified member functions
+// { dg-additional-options -fabi-compat-version=0 }
 
 struct A;
 void f (void (A::*)() const) {}
diff --git a/gcc/testsuite/g++.dg/abi/mangle50.C b/gcc/testsuite/g++.dg/abi/mangle50.C
index 90566c2198d..68abc9dad26 100644
--- a/gcc/testsuite/g++.dg/abi/mangle50.C
+++ b/gcc/testsuite/g++.dg/abi/mangle50.C
@@ -1,5 +1,6 @@ 
 // DR 342, PR c++/48582
 // { dg-do compile { target c++11 } }
+// { dg-additional-options -fabi-compat-version=0 }
 
 struct A;
 template < void * = nullptr > void f() { }
diff --git a/gcc/testsuite/g++.dg/abi/mangle51.C b/gcc/testsuite/g++.dg/abi/mangle51.C
index e7c2c747a9b..a2b9f2c1833 100644
--- a/gcc/testsuite/g++.dg/abi/mangle51.C
+++ b/gcc/testsuite/g++.dg/abi/mangle51.C
@@ -1,5 +1,5 @@ 
 // { dg-do compile { target c++11 } }
-// { dg-options "-fabi-version=0" }
+// { dg-options "-fabi-version=0 -fabi-compat-version=0" }
 
 void* operator new (__SIZE_TYPE__, void *p) { return p; }
 int i;
diff --git a/gcc/testsuite/g++.dg/abi/mangle52.C b/gcc/testsuite/g++.dg/abi/mangle52.C
index 1e7eca042bf..b42b58dd87d 100644
--- a/gcc/testsuite/g++.dg/abi/mangle52.C
+++ b/gcc/testsuite/g++.dg/abi/mangle52.C
@@ -1,4 +1,4 @@ 
-// { dg-options "-fabi-version=18 -Wabi=2" }
+// { dg-options "-fabi-version=18 -fabi-compat-version=18 -Wabi=2" }
 
 template <unsigned int> struct helper {};
 // { dg-final { scan-assembler "\n_?_Z6check1IiEvP6helperIXszscT_Li1EEE\[: \t\n\]" } }
diff --git a/gcc/testsuite/g++.dg/abi/mangle53.C b/gcc/testsuite/g++.dg/abi/mangle53.C
index 727fd7586f3..54090399d32 100644
--- a/gcc/testsuite/g++.dg/abi/mangle53.C
+++ b/gcc/testsuite/g++.dg/abi/mangle53.C
@@ -1,4 +1,5 @@ 
 // { dg-do compile { target c++11 } }
+// { dg-additional-options -fabi-compat-version=0 }
 
 bool b;
 int i;
diff --git a/gcc/testsuite/g++.dg/abi/mangle54.C b/gcc/testsuite/g++.dg/abi/mangle54.C
index ba1d3bc3182..12cb071fe8b 100644
--- a/gcc/testsuite/g++.dg/abi/mangle54.C
+++ b/gcc/testsuite/g++.dg/abi/mangle54.C
@@ -1,5 +1,5 @@ 
 // { dg-do compile { target c++11 } }
-// { dg-options "-fabi-version=0 -Wabi=2" }
+// { dg-options "-fabi-version=0 -fabi-compat-version=0 -Wabi=2" }
 
 int i;
 // { dg-final { scan-assembler "_Z2f1IiEDTppfp_ET_" } }
diff --git a/gcc/testsuite/g++.dg/abi/mangle55.C b/gcc/testsuite/g++.dg/abi/mangle55.C
index 72ea83444c8..2d5d3a0aee1 100644
--- a/gcc/testsuite/g++.dg/abi/mangle55.C
+++ b/gcc/testsuite/g++.dg/abi/mangle55.C
@@ -1,4 +1,5 @@ 
 // { dg-do compile { target c++11 } }
+// { dg-additional-options -fabi-compat-version=0 }
 
 struct A { int i; };
 // { dg-final { scan-assembler "_Z2f1Ii1AEDTdsfp_fp0_ET0_MS2_T_" } }
diff --git a/gcc/testsuite/g++.dg/abi/mangle56.C b/gcc/testsuite/g++.dg/abi/mangle56.C
index 5c66db5581d..f6ea7fc7694 100644
--- a/gcc/testsuite/g++.dg/abi/mangle56.C
+++ b/gcc/testsuite/g++.dg/abi/mangle56.C
@@ -1,4 +1,5 @@ 
 // { dg-do compile { target c++11 } }
+// { dg-additional-options -fabi-compat-version=0 }
 
 template <class T> T g(T t1, T t2) { return t2; }
 // { dg-final { scan-assembler "_Z2f1IiEDTcl1gfp_ilEEET_" } }
diff --git a/gcc/testsuite/g++.dg/abi/mangle57.C b/gcc/testsuite/g++.dg/abi/mangle57.C
index 46cf377ebc7..09b614956ed 100644
--- a/gcc/testsuite/g++.dg/abi/mangle57.C
+++ b/gcc/testsuite/g++.dg/abi/mangle57.C
@@ -1,5 +1,5 @@ 
 // { dg-do compile { target c++11 } }
-// { dg-options "-fabi-version=0 -Wabi=2" }
+// { dg-options "-fabi-version=0 -fabi-compat-version=0 -Wabi=2" }
 
 template<typename T> int cmp1(T a, T b);
 int cmp2(char a, char b);
diff --git a/gcc/testsuite/g++.dg/abi/mangle58.C b/gcc/testsuite/g++.dg/abi/mangle58.C
index d2c90b43a2d..2ed0bbf7a2b 100644
--- a/gcc/testsuite/g++.dg/abi/mangle58.C
+++ b/gcc/testsuite/g++.dg/abi/mangle58.C
@@ -1,5 +1,5 @@ 
 // { dg-do compile { target c++11 } }
-// { dg-options "-fabi-version=0 -Wabi=2" }
+// { dg-options "-fabi-version=0 -fabi-compat-version=0 -Wabi=2" }
 
 template<typename T, int (*cmp)(T, T)> struct A { };
 struct B {
diff --git a/gcc/testsuite/g++.dg/abi/mangle59.C b/gcc/testsuite/g++.dg/abi/mangle59.C
index ba0befddc50..43f72909249 100644
--- a/gcc/testsuite/g++.dg/abi/mangle59.C
+++ b/gcc/testsuite/g++.dg/abi/mangle59.C
@@ -1,5 +1,5 @@ 
 // { dg-do compile { target c++11 } }
-// { dg-options "-fabi-version=0" }
+// { dg-options "-fabi-version=0 -fabi-compat-version=0" }
 
 // { dg-final { scan-assembler "_Z1fIiEDTcmdlfp_psfp_EPT_" } }
 template <class T> auto f (T* p) -> decltype(delete p, +p) { return p; }
diff --git a/gcc/testsuite/g++.dg/abi/mangle6.C b/gcc/testsuite/g++.dg/abi/mangle6.C
index 280fe249980..72403bbfc3b 100644
--- a/gcc/testsuite/g++.dg/abi/mangle6.C
+++ b/gcc/testsuite/g++.dg/abi/mangle6.C
@@ -1,5 +1,6 @@ 
 /* Check that __int128 types are mangled.  */
 /* { dg-do compile { target mips*-*-* } } */
+// { dg-additional-options -fabi-compat-version=0 }
 
 #ifdef __mips64
 typedef int int128 __attribute__ ((mode(TI)));
diff --git a/gcc/testsuite/g++.dg/abi/mangle60.C b/gcc/testsuite/g++.dg/abi/mangle60.C
index f7e893a558a..c835ce2f330 100644
--- a/gcc/testsuite/g++.dg/abi/mangle60.C
+++ b/gcc/testsuite/g++.dg/abi/mangle60.C
@@ -1,5 +1,5 @@ 
 // PR c++/51854
-// { dg-options "" }
+// { dg-options "-fabi-compat-version=0" }
 
 template <unsigned N> struct A;
 
diff --git a/gcc/testsuite/g++.dg/abi/mangle61.C b/gcc/testsuite/g++.dg/abi/mangle61.C
index 2ae336e42a3..84ad20e90aa 100644
--- a/gcc/testsuite/g++.dg/abi/mangle61.C
+++ b/gcc/testsuite/g++.dg/abi/mangle61.C
@@ -1,5 +1,6 @@ 
 // PR c++/56237
 // { dg-do compile }
+// { dg-additional-options -fabi-compat-version=0 }
 
 void *p[4];
 
diff --git a/gcc/testsuite/g++.dg/abi/mangle62.C b/gcc/testsuite/g++.dg/abi/mangle62.C
index db541ca1902..fe2ca9f82a9 100644
--- a/gcc/testsuite/g++.dg/abi/mangle62.C
+++ b/gcc/testsuite/g++.dg/abi/mangle62.C
@@ -2,7 +2,7 @@ 
 // as a substitution candidate for a function type with function-cv-quals.
 // Test for the conformant behavior.
 
-// { dg-options "-fabi-version=0 -Wabi=7" }
+// { dg-options "-fabi-version=0 -fabi-compat-version=0 -Wabi=7" }
 
 template <class T, class U> struct A { };
 // { dg-final { scan-assembler "\n_?_Z1fP1AIKFvvEFvvEE\[: \t\n\]" } }
diff --git a/gcc/testsuite/g++.dg/abi/mangle62a.C b/gcc/testsuite/g++.dg/abi/mangle62a.C
index a48efd07ae7..a22421a326d 100644
--- a/gcc/testsuite/g++.dg/abi/mangle62a.C
+++ b/gcc/testsuite/g++.dg/abi/mangle62a.C
@@ -2,7 +2,7 @@ 
 // as a substitution candidate for a function type with function-cv-quals.
 // Test for that for backward compatibility.
 
-// { dg-options "-fabi-version=7 -Wabi" }
+// { dg-options "-fabi-version=7 -fabi-compat-version=7 -Wabi=0" }
 
 template <class T, class U> struct A { };
 // { dg-final { scan-assembler "\n_?_Z1fP1AIKFvvES0_E\[: \t\n\]" } }
diff --git a/gcc/testsuite/g++.dg/abi/mangle63.C b/gcc/testsuite/g++.dg/abi/mangle63.C
index d6a58a35b82..773691a887c 100644
--- a/gcc/testsuite/g++.dg/abi/mangle63.C
+++ b/gcc/testsuite/g++.dg/abi/mangle63.C
@@ -1,5 +1,6 @@ 
 // DR 850 makes this valid
 // { dg-do compile { target c++11 } }
+// { dg-additional-options -fabi-compat-version=0 }
 
 template<class T> struct A
 {
diff --git a/gcc/testsuite/g++.dg/abi/mangle64.C b/gcc/testsuite/g++.dg/abi/mangle64.C
index 778cda70dd1..9c429850eee 100644
--- a/gcc/testsuite/g++.dg/abi/mangle64.C
+++ b/gcc/testsuite/g++.dg/abi/mangle64.C
@@ -1,5 +1,5 @@ 
 // { dg-do compile { target msp430*-*-* } }
-// { dg-options "-std=gnu++11" }
+// { dg-options "-std=gnu++11 -fabi-compat-version=0" }
 // { dg-skip-if "" { msp430*-*-* } { "-mcpu=msp430" } { "" } }
 
 __int20 x;
diff --git a/gcc/testsuite/g++.dg/abi/mangle65.C b/gcc/testsuite/g++.dg/abi/mangle65.C
index 13169c2797d..f16433164c0 100644
--- a/gcc/testsuite/g++.dg/abi/mangle65.C
+++ b/gcc/testsuite/g++.dg/abi/mangle65.C
@@ -1,5 +1,6 @@ 
 // PR c++/64898
 // { dg-final { scan-assembler-not "_Z6foovar" } }
+// { dg-additional-options -fabi-compat-version=0 }
 
 template <class> void f()
 {
diff --git a/gcc/testsuite/g++.dg/abi/mangle66.C b/gcc/testsuite/g++.dg/abi/mangle66.C
index 94ac08e30ce..918eaa9ff8a 100644
--- a/gcc/testsuite/g++.dg/abi/mangle66.C
+++ b/gcc/testsuite/g++.dg/abi/mangle66.C
@@ -1,4 +1,5 @@ 
 // { dg-do compile { target c++11 } }
+// { dg-additional-options -fabi-compat-version=0 }
 
 namespace N {
   template <class T> using A = typename T::template X<int>;
diff --git a/gcc/testsuite/g++.dg/abi/mangle68.C b/gcc/testsuite/g++.dg/abi/mangle68.C
index 3e16eeb62d0..3ffa39d4665 100644
--- a/gcc/testsuite/g++.dg/abi/mangle68.C
+++ b/gcc/testsuite/g++.dg/abi/mangle68.C
@@ -1,5 +1,6 @@ 
 // PR c++/89356
 // { dg-do compile { target c++11 } }
+// { dg-additional-options -fabi-compat-version=0 }
 
 template<typename T>
 auto fn () -> decltype(unsigned{2u} + (T)3) { return 42; }
diff --git a/gcc/testsuite/g++.dg/abi/mangle69.C b/gcc/testsuite/g++.dg/abi/mangle69.C
index dea3eeca022..4dbe765d158 100644
--- a/gcc/testsuite/g++.dg/abi/mangle69.C
+++ b/gcc/testsuite/g++.dg/abi/mangle69.C
@@ -1,4 +1,5 @@ 
 // { dg-do compile { target c++2a } }
+// { dg-additional-options -fabi-compat-version=0 }
 
 struct A1 { char c[5]; };
 
diff --git a/gcc/testsuite/g++.dg/abi/mangle7.C b/gcc/testsuite/g++.dg/abi/mangle7.C
index 14c65a24da8..c2c8fb57471 100644
--- a/gcc/testsuite/g++.dg/abi/mangle7.C
+++ b/gcc/testsuite/g++.dg/abi/mangle7.C
@@ -1,4 +1,5 @@ 
 /* { dg-do compile } */
+// { dg-additional-options -fabi-compat-version=0 }
 
 typedef void *const t1[2];
 float const f1(t1 (&)[79], ...) { return 0.0f; }
diff --git a/gcc/testsuite/g++.dg/abi/mangle70.C b/gcc/testsuite/g++.dg/abi/mangle70.C
index 39c987d73c2..197727c5ad1 100644
--- a/gcc/testsuite/g++.dg/abi/mangle70.C
+++ b/gcc/testsuite/g++.dg/abi/mangle70.C
@@ -1,6 +1,7 @@ 
 // Verify that class literals are mangled the same way regardless
 // of the underlying type.
 // { dg-do compile { target c++2a } }
+// { dg-additional-options -fabi-compat-version=0 }
 
 struct I { int a[5], b[5], c[5]; };
 template <I> struct X { };
diff --git a/gcc/testsuite/g++.dg/abi/mangle71.C b/gcc/testsuite/g++.dg/abi/mangle71.C
index 038befa8f7d..92747c4432a 100644
--- a/gcc/testsuite/g++.dg/abi/mangle71.C
+++ b/gcc/testsuite/g++.dg/abi/mangle71.C
@@ -1,5 +1,6 @@ 
 // Verify mangling of class literals of types with ctors.
 // { dg-do compile { target c++2a } }
+// { dg-additional-options -fabi-compat-version=0 }
 
 struct A
 {
diff --git a/gcc/testsuite/g++.dg/abi/mangle72.C b/gcc/testsuite/g++.dg/abi/mangle72.C
index 308865bd2c6..9581451c25d 100644
--- a/gcc/testsuite/g++.dg/abi/mangle72.C
+++ b/gcc/testsuite/g++.dg/abi/mangle72.C
@@ -1,6 +1,7 @@ 
 // Verify manglinng of class literals with pointers to members.
 // Some of the mangling here is wrong.  Note the FIXME comments below.
 // { dg-do compile { target c++2a } }
+// { dg-additional-options -fabi-compat-version=0 }
 
 struct A { int a[2]; };
 
diff --git a/gcc/testsuite/g++.dg/abi/mangle73.C b/gcc/testsuite/g++.dg/abi/mangle73.C
index 2a5322a37c3..c226307c598 100644
--- a/gcc/testsuite/g++.dg/abi/mangle73.C
+++ b/gcc/testsuite/g++.dg/abi/mangle73.C
@@ -1,4 +1,5 @@ 
 // { dg-do compile { target c++2a } }
+// { dg-additional-options -fabi-compat-version=0 }
 
 struct A
 {
diff --git a/gcc/testsuite/g++.dg/abi/mangle74.C b/gcc/testsuite/g++.dg/abi/mangle74.C
index 4e1c6329039..7451ce81495 100644
--- a/gcc/testsuite/g++.dg/abi/mangle74.C
+++ b/gcc/testsuite/g++.dg/abi/mangle74.C
@@ -1,5 +1,5 @@ 
 // { dg-do compile { target c++17 } }
-// { dg-options "-fno-inline -O0" }
+// { dg-options "-fno-inline -O0 -fabi-compat-version=0" }
 
 inline auto var = [] () {return 2;};
 
diff --git a/gcc/testsuite/g++.dg/abi/mangle75.C b/gcc/testsuite/g++.dg/abi/mangle75.C
index f2661997a33..b7619ed3159 100644
--- a/gcc/testsuite/g++.dg/abi/mangle75.C
+++ b/gcc/testsuite/g++.dg/abi/mangle75.C
@@ -1,5 +1,6 @@ 
 // PR c++/91377
 // { dg-do compile { target c++11 } }
+// { dg-additional-options -fabi-compat-version=0 }
 
 struct f {
   static constexpr int d = 3;
diff --git a/gcc/testsuite/g++.dg/abi/mangle76.C b/gcc/testsuite/g++.dg/abi/mangle76.C
index fe326e6c689..a87eca8f9d9 100644
--- a/gcc/testsuite/g++.dg/abi/mangle76.C
+++ b/gcc/testsuite/g++.dg/abi/mangle76.C
@@ -1,6 +1,6 @@ 
 // PR c++/98545
 // { dg-do compile { target c++11 } }
-// { dg-options "-Wabi=14" }
+// { dg-options "-Wabi=14 -fabi-compat-version=0" }
 
 class a {
 public:
diff --git a/gcc/testsuite/g++.dg/abi/mangle77.C b/gcc/testsuite/g++.dg/abi/mangle77.C
index 1181dc82f56..30d1a1623d3 100644
--- a/gcc/testsuite/g++.dg/abi/mangle77.C
+++ b/gcc/testsuite/g++.dg/abi/mangle77.C
@@ -2,6 +2,7 @@ 
 // arguments and other expressions in the signature.
 
 // { dg-do compile { target c++20 } }
+// { dg-additional-options -fabi-compat-version=0 }
 
 struct B
 {
diff --git a/gcc/testsuite/g++.dg/abi/mangle78.C b/gcc/testsuite/g++.dg/abi/mangle78.C
index 63c4d779e9f..ac332c65107 100644
--- a/gcc/testsuite/g++.dg/abi/mangle78.C
+++ b/gcc/testsuite/g++.dg/abi/mangle78.C
@@ -1,5 +1,6 @@ 
 // PR c++/70790
 // { dg-do compile { target c++11 } }
+// { dg-additional-options -fabi-compat-version=0 }
 
 template<bool B>
 struct A { };
diff --git a/gcc/testsuite/g++.dg/abi/mangle8.C b/gcc/testsuite/g++.dg/abi/mangle8.C
index 6a073588aae..aa0e17dba1e 100644
--- a/gcc/testsuite/g++.dg/abi/mangle8.C
+++ b/gcc/testsuite/g++.dg/abi/mangle8.C
@@ -2,6 +2,7 @@ 
 // Bug: We were encoding the name of the instantiation as 'operator int'
 // rather than 'operator T'.
 // { dg-do compile }
+// { dg-additional-options -fabi-compat-version=0 }
 
 struct C {
     template <class T>
diff --git a/gcc/testsuite/g++.dg/abi/mangle9.C b/gcc/testsuite/g++.dg/abi/mangle9.C
index f3ededfb4d0..941c58a7f19 100644
--- a/gcc/testsuite/g++.dg/abi/mangle9.C
+++ b/gcc/testsuite/g++.dg/abi/mangle9.C
@@ -1,4 +1,4 @@ 
-// { dg-options "-fabi-version=0" }
+// { dg-options "-fabi-version=0 -fabi-compat-version=0" }
 
 template <typename Q>
 void f (typename Q::X) {}