aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.8/gcc/testsuite/g++.dg/ipa/pr60640-2.C
diff options
context:
space:
mode:
Diffstat (limited to 'gcc-4.8/gcc/testsuite/g++.dg/ipa/pr60640-2.C')
-rw-r--r--gcc-4.8/gcc/testsuite/g++.dg/ipa/pr60640-2.C15
1 files changed, 15 insertions, 0 deletions
diff --git a/gcc-4.8/gcc/testsuite/g++.dg/ipa/pr60640-2.C b/gcc-4.8/gcc/testsuite/g++.dg/ipa/pr60640-2.C
new file mode 100644
index 000000000..c6e614cc0
--- /dev/null
+++ b/gcc-4.8/gcc/testsuite/g++.dg/ipa/pr60640-2.C
@@ -0,0 +1,15 @@
+// { dg-do compile }
+// { dg-options "-O3" }
+
+struct B { virtual unsigned f () const; };
+struct C { virtual void f (); };
+struct F { virtual unsigned f (bool) const; ~F (); };
+struct J : C, F {};
+struct G : J { unsigned f (bool) const { return 0; } };
+struct H : B
+{
+ H (int);
+ unsigned f () const { return ((const F &) h).f (0); }
+ G h;
+};
+H h (0);