summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/abi/key2.C
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/g++.dg/abi/key2.C')
-rw-r--r--gcc/testsuite/g++.dg/abi/key2.C16
1 files changed, 16 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/abi/key2.C b/gcc/testsuite/g++.dg/abi/key2.C
new file mode 100644
index 000000000..0d1347aaa
--- /dev/null
+++ b/gcc/testsuite/g++.dg/abi/key2.C
@@ -0,0 +1,16 @@
+// On Darwin, key methods that are inline result in comdat style things. */
+// PR darwin/25908
+
+// { dg-do compile { target *-*-darwin* } }
+// { dg-final { scan-assembler ".globl __ZTV1f\\n .weak_definition __ZTV1f(\\n .section __DATA,__const_coal,coalesced)?\\n .align" } }
+// { dg-final { scan-assembler ".globl __ZTS1f\\n .weak_definition __ZTS1f\\n .section __TEXT,__const_coal,coalesced" } }
+// { dg-final { scan-assembler ".globl __ZTI1f\\n .weak_definition __ZTI1f(\\n .section __DATA,__const_coal,coalesced)?\\n .align" } }
+
+class f
+{
+ virtual void g();
+ virtual void h();
+} c;
+inline void f::g() {}
+int sub(void)
+{}