Hi!

This patch adds testcase for the PR you've fixed.  Bootstrapped/regtested on
x86_64-linux and i686-linux, additionally tested with your patch reverted,
where the testcase fails.

Ok for trunk?

2015-02-12  Jakub Jelinek  <ja...@redhat.com>

        PR sanitizer/65000
        * g++.dg/ubsan/pr65000.C: New test.

--- gcc/testsuite/g++.dg/ubsan/pr65000.C.jj     2015-02-12 14:23:00.908487082 
+0100
+++ gcc/testsuite/g++.dg/ubsan/pr65000.C        2015-02-12 14:21:35.000000000 
+0100
@@ -0,0 +1,14 @@
+// PR sanitizer/65000
+// { dg-do compile }
+// { dg-options "-O1 -fsanitize=undefined -fno-sanitize-recover" }
+
+struct B { virtual ~B () {} void foo (); };
+struct C { virtual ~C (); };
+struct A : public virtual C {};
+struct D : A { ~D () { d.foo (); } B d; };
+
+void
+bar ()
+{
+  D a;
+}
 
        Jakub

Reply via email to