On Mon, Apr 18, 2011 at 2:40 PM, Jakub Jelinek <ja...@redhat.com> wrote: > Hi! > > If TREE_BINFO has BV_VCALL_INDEX set, this needs to be dynamically > adjusted, but none of the callers are prepared to handle that. > Thus, this patch makes devirtualization give up in those cases. > > Bootstrapped/regtested on x86_64-linux and i686-linux, trunk and 4.6. > On the trunk the testcase ICEs before and after the patch in some new > callgraph > checking (added today or so, Honza?), on the branch it works just fine. > > Ok for trunk/4.6? > > 2011-04-18 Jakub Jelinek <ja...@redhat.com> > > PR middle-end/48661 > * gimple-fold.c (gimple_get_virt_method_for_binfo): Return NULL > if TREE_TYPE (v) is non-NULL. > > * gimple-fold.c (gimple_get_virt_method_for_binfo): Renamed from > gimple_get_virt_mehtod_for_binfo. > * gimple.h (gimple_get_virt_method_for_binfo): Likewise. > * ipa-cp.c (ipcp_process_devirtualization_opportunities): Adjust > callers. > * ipa-prop.c (try_make_edge_direct_virtual_call): Likewise. > > * g++.dg/torture/pr48661.C: New test. >
This caused: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48674 -- H.J.