public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r14-8633] testsuite: fix anon6 mangling [PR112846]
@ 2024-01-30 17:10 Jason Merrill
0 siblings, 0 replies; only message in thread
From: Jason Merrill @ 2024-01-30 17:10 UTC (permalink / raw)
To: gcc-cvs
https://gcc.gnu.org/g:209fc1e5f6c67e55e579b69f617b0b678b1bfdf0
commit r14-8633-g209fc1e5f6c67e55e579b69f617b0b678b1bfdf0
Author: Jason Merrill <jason@redhat.com>
Date: Tue Jan 30 12:07:21 2024 -0500
testsuite: fix anon6 mangling [PR112846]
As with r14-6796-g2fa122cae50cd8, avoid mangling compatibility aliases in
mangling tests, and test the new mangling.
PR c++/112846
gcc/testsuite/ChangeLog:
* g++.dg/abi/anon6.C: Specify ABI v18.
* g++.dg/abi/anon6a.C: New test for ABI v19.
Diff:
---
gcc/testsuite/g++.dg/abi/anon6.C | 1 +
gcc/testsuite/g++.dg/abi/anon6a.C | 20 ++++++++++++++++++++
2 files changed, 21 insertions(+)
diff --git a/gcc/testsuite/g++.dg/abi/anon6.C b/gcc/testsuite/g++.dg/abi/anon6.C
index 7be0b0bbdb7e..fd766109629e 100644
--- a/gcc/testsuite/g++.dg/abi/anon6.C
+++ b/gcc/testsuite/g++.dg/abi/anon6.C
@@ -1,5 +1,6 @@
// PR c++/108566
// { dg-do compile { target c++20 } }
+// { dg-additional-options "-fabi-version=18 -fabi-compat-version=18" }
template<typename T>
struct wrapper1 {
diff --git a/gcc/testsuite/g++.dg/abi/anon6a.C b/gcc/testsuite/g++.dg/abi/anon6a.C
new file mode 100644
index 000000000000..69c9adb42569
--- /dev/null
+++ b/gcc/testsuite/g++.dg/abi/anon6a.C
@@ -0,0 +1,20 @@
+// PR c++/108566
+// { dg-do compile { target c++20 } }
+// { dg-additional-options "-fabi-compat-version=0" }
+
+template<typename T>
+struct wrapper1 {
+ union {
+ union {
+ T RightName;
+ };
+ };
+};
+
+template<auto tparam> void dummy(){}
+
+void uses() {
+ dummy<wrapper1<double>{123.0}>();
+}
+
+// { dg-final { scan-assembler "_Z5dummyITnDaXtl8wrapper1IdEtlNS1_Ut_Edi9RightNametlNS2_Ut_Edi9RightNameLd405ec00000000000EEEEEEvv" } }
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2024-01-30 17:10 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-01-30 17:10 [gcc r14-8633] testsuite: fix anon6 mangling [PR112846] Jason Merrill
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).