From: hubicka Date: Fri, 7 Feb 2014 06:01:36 +0000 (+0000) Subject: PR ipa/59918 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=d0f12d442bcc3dd04b66458fc73bf21e837b6b00;p=thirdparty%2Fgcc.git PR ipa/59918 * 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 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 43e9d9cd6fc0..0a0674f47385 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2014-02-06 Jan Hubicka + + PR ipa/59918 + * ipa-devirt.c (record_target_from_binfo): Remove overactive sanity check. + 2014-02-06 Jan Hubicka PR ipa/59469 diff --git a/gcc/ipa-devirt.c b/gcc/ipa-devirt.c index c110a982209e..3341a5a9fc03 100644 --- a/gcc/ipa-devirt.c +++ b/gcc/ipa-devirt.c @@ -689,10 +689,7 @@ record_target_from_binfo (vec &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 diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 2cac8d2cf332..45f215e239c7 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2014-02-06 Jan Hubicka + + PR ipa/59918 + * g++.dg/torture/pr59918.C: New testcase. + 2014-02-06 Jakub Jelinek 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 index 000000000000..b30d33eb369b --- /dev/null +++ b/gcc/testsuite/g++.dg/torture/pr59918.C @@ -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 {};