https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64059

Jan Hubicka <hubicka at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |hubicka at gcc dot gnu.org

--- Comment #2 from Jan Hubicka <hubicka at gcc dot gnu.org> ---
The patch I sent to original PR log works on the testcase:
Index: ../../gcc/ipa-prop.c
===================================================================
--- ../../gcc/ipa-prop.c        (revision 217980)
+++ ../../gcc/ipa-prop.c        (working copy)
@@ -2155,7 +2155,7 @@ ipa_analyze_call_uses (struct func_body_
   if (cs && !cs->indirect_unknown_callee)
     return;

-  if (cs->indirect_info->polymorphic)
+  if (cs->indirect_info->polymorphic && flag_devirtualize)
     {
       tree instance;
       tree target = gimple_call_fn (call);

The thing is that get_dynamic_type should be never called when devirt is
disabled.

Reply via email to