re PR sanitizer/65000 (ICE in in expand_builtin_eh_common, at except.c:2072)
authorJakub Jelinek <jakub@redhat.com>
Thu, 12 Feb 2015 21:30:56 +0000 (22:30 +0100)
committerJakub Jelinek <jakub@gcc.gnu.org>
Thu, 12 Feb 2015 21:30:56 +0000 (22:30 +0100)
PR sanitizer/65000
* g++.dg/ubsan/pr65000.C: New test.

From-SVN: r220663

gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/ubsan/pr65000.C [new file with mode: 0644]

index ef26e99..0e82b76 100644 (file)
@@ -1,3 +1,8 @@
+2015-02-12  Jakub Jelinek  <jakub@redhat.com>
+
+       PR sanitizer/65000
+       * g++.dg/ubsan/pr65000.C: New test.
+
 2015-02-12  Paul Thomas  <pault@gcc.gnu.org>
 
        PR fortran/64932
diff --git a/gcc/testsuite/g++.dg/ubsan/pr65000.C b/gcc/testsuite/g++.dg/ubsan/pr65000.C
new file mode 100644 (file)
index 0000000..298547e
--- /dev/null
@@ -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;
+}