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')
-rwxr-xr-xgcc/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 100755
index 0000000..7cd8059
--- /dev/null
+++ b/gcc/testsuite/g++.old-deja/g++.other/cast1.C
@@ -0,0 +1,16 @@
+// Build don't link:
+
+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));
+}