]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
PR ipa/59918
authorhubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 7 Feb 2014 06:01:36 +0000 (06:01 +0000)
committerhubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 7 Feb 2014 06:01:36 +0000 (06:01 +0000)
* ipa-devirt.c (record_target_from_binfo): Remove overactive sanity check.
* g++.dg/torture/pr59918.C: New testcase.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@207592 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/ipa-devirt.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/torture/pr59918.C [new file with mode: 0644]

index 43e9d9cd6fc07f3dd648a87bb896bb1168a9b7da..0a0674f473851abf5ca5811a4a513ce8d53d3657 100644 (file)
@@ -1,3 +1,8 @@
+2014-02-06  Jan Hubicka  <hubicka@ucw.cz>
+
+       PR ipa/59918
+       * ipa-devirt.c (record_target_from_binfo): Remove overactive sanity check.
+
 2014-02-06  Jan Hubicka  <hubicka@ucw.cz>
 
        PR ipa/59469
index c110a982209edc746b59e2798eacab13f5fe7a4b..3341a5a9fc03c56613389a93da7db176325b2316 100644 (file)
@@ -689,10 +689,7 @@ record_target_from_binfo (vec <cgraph_node *> &nodes,
         we may not have its associated vtable.  This is not a problem, since
         we will walk it on the other path.  */
       if (!type_binfo)
-       {
-         gcc_assert (BINFO_VIRTUAL_P (binfo));
-         return;
-       }
+       return;
       tree inner_binfo = get_binfo_at_offset (type_binfo,
                                              offset, otr_type);
       /* For types in anonymous namespace first check if the respective vtable
index 2cac8d2cf3329da2e1efd8854c5dbd9aff09d7ed..45f215e239c79ec25d60cb24aaa47b9a54fca6f2 100644 (file)
@@ -1,3 +1,8 @@
+2014-02-06  Jan Hubicka  <hubicka@ucw.cz>
+
+       PR ipa/59918
+       * g++.dg/torture/pr59918.C: New testcase.
+
 2014-02-06  Jakub Jelinek  <jakub@redhat.com>
 
        PR target/59575
diff --git a/gcc/testsuite/g++.dg/torture/pr59918.C b/gcc/testsuite/g++.dg/torture/pr59918.C
new file mode 100644 (file)
index 0000000..b30d33e
--- /dev/null
@@ -0,0 +1,18 @@
+/* { dg-do compile } */
+struct E {
+  ~E();
+  virtual void f() const;
+};
+struct B : E {};
+struct G : virtual B {};
+struct A {
+  virtual ~A();
+};
+struct J : E {
+  void f() const {
+    E *p = 0;
+    p->f();
+  }
+};
+J h;
+struct I : A, G, virtual B {};