summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.other/cast1.C
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/g++.old-deja/g++.other/cast1.C')
-rw-r--r--gcc/testsuite/g++.old-deja/g++.other/cast1.C16
1 files changed, 16 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.old-deja/g++.other/cast1.C b/gcc/testsuite/g++.old-deja/g++.other/cast1.C
new file mode 100644
index 000000000..989667a37
--- /dev/null
+++ b/gcc/testsuite/g++.old-deja/g++.other/cast1.C
@@ -0,0 +1,16 @@
+// { dg-do assemble }
+
+struct S0 { };
+struct S1 : virtual public S0 { };
+struct S2 : virtual public S0 { };
+
+struct S3 : public S1, public S2, virtual public S0
+{
+};
+
+void f(const S0*) {}
+
+void g()
+{
+ f(static_cast<S3*>(0));
+}