gcc/gcc5-pr65000.patch

23 lines
576 B
Diff
Raw Normal View History

2015-02-12 18:53:00 +00:00
2015-02-12 Jakub Jelinek <jakub@redhat.com>
2015-02-10 18:26:49 +00:00
PR sanitizer/65000
2015-02-12 18:53:00 +00:00
* g++.dg/ubsan/pr65000.C: New test.
2015-02-10 18:26:49 +00:00
2015-02-12 18:53:00 +00:00
--- 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" }
2015-02-10 18:26:49 +00:00
+
2015-02-12 18:53:00 +00:00
+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;
+}