[Bug middle-end/52939] [4.7/4.8 Regression] ice in gimple_get_virt_method_for_binfo with -O3

jamborm at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Thu Apr 12 17:05:00 GMT 2012


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52939

--- Comment #3 from Martin Jambor <jamborm at gcc dot gnu.org> 2012-04-12 17:05:01 UTC ---
Created attachment 27143
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=27143
Simple testcase

This should be a simpler testcase.  What happens is that we are
attempting to devirtualize call to a virtual method introduced in a
descendant but with an ancestor which does not have it.  I suppose
this is OK if the call is never executed in run-time.

Dealing with this situation in gimple_get_virt_method_for_binfo would
be easy, but perhaps we want fold_ctor_reference to return NULL is it
is requested to fold an expression from beyond the provided
constructor?



More information about the Gcc-bugs mailing list