aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/abi/covariant1.C
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/g++.dg/abi/covariant1.C')
-rw-r--r--gcc/testsuite/g++.dg/abi/covariant1.C13
1 files changed, 9 insertions, 4 deletions
diff --git a/gcc/testsuite/g++.dg/abi/covariant1.C b/gcc/testsuite/g++.dg/abi/covariant1.C
index 203ec2c9fcb..ae8c5e603da 100644
--- a/gcc/testsuite/g++.dg/abi/covariant1.C
+++ b/gcc/testsuite/g++.dg/abi/covariant1.C
@@ -1,8 +1,8 @@
// { dg-do compile }
// { dg-options "-w" }
-// We don't want to use a covariant thunk to have a virtual
-// primary base
+// If a covariant thunk is overriding a virtual primary base, we have to
+// use the vcall offset even though we know it will be 0.
struct c4 {};
@@ -16,6 +16,11 @@ struct c12 : c11 { };
struct c14 :
virtual c12,
- virtual c11 { virtual c12* f17(); };
+ virtual c11 { virtual void f(); c12* f17(); };
-// { dg-final { scan-assembler-not "\n_ZTch0_v0_n16_N3c143f17Ev\[: \t\n\]" } }
+void c14::f() { }
+
+// { dg-final { scan-assembler "_ZTcv0_n12_v0_n16_N3c143f17Ev" { target ilp32 } } }
+// { dg-final { scan-assembler-not "_ZTch0_v0_n16_N3c143f17Ev" } }
+// { dg-final { scan-assembler "_ZTcv0_n24_v0_n32_N3c143f17Ev" { target lp64 } } }
+// { dg-final { scan-assembler-not "_ZTch0_v0_n32_N3c143f17Ev" } }