gcc/gcc5-pr65000.patch
Jakub Jelinek 0215eb2e85 5.0.0-0.12
2015-02-12 19:53:00 +01:00

23 lines
576 B
Diff

2015-02-12 Jakub Jelinek <jakub@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;
+}