public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "hubicka at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug ipa/64378] [5 Regression] ICE: in inline_call, at ipa-inline-transform.c:347 with -O3 -fno-ipa-cp
Date: Fri, 16 Jan 2015 04:39:00 -0000	[thread overview]
Message-ID: <bug-64378-4-bhLYKo95ae@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-64378-4@http.gcc.gnu.org/bugzilla/>

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

--- Comment #3 from Jan Hubicka <hubicka at gcc dot gnu.org> ---
The bug is that ipa-cp disagrees about ipa-prop whether the call is speculative
or not. I am testing:

Index: ipa-prop.c
===================================================================
--- ipa-prop.c  (revision 219700)
+++ ipa-prop.c  (working copy)
@@ -2985,7 +2985,7 @@ try_make_edge_direct_virtual_call (struc
                  || !possible_polymorphic_call_target_p
                       (ie, cgraph_node::get (t)))
                {
-                 /* Do not speculate builtin_unreachable, it is stpid!  */
+                 /* Do not speculate builtin_unreachable, it is stupid!  */
                  if (!ie->indirect_info->vptr_changed)
                    target = ipa_impossible_devirt_target (ie, target);
                }
@@ -3013,6 +3013,7 @@ try_make_edge_direct_virtual_call (struc
      ctx, &final);
   if (final && targets.length () <= 1)
     {
+      speculative = false;
       if (targets.length () == 1)
        target = targets[0]->decl;
       else
Index: ipa-cp.c
===================================================================
--- ipa-cp.c    (revision 219700)
+++ ipa-cp.c    (working copy)
@@ -1975,8 +1975,13 @@ ipa_get_indirect_edge_target_1 (struct c
        }
     }
   else if (t)
-    context = ipa_polymorphic_call_context (t, ie->indirect_info->otr_type,
-                                           anc_offset);
+    {
+      context = ipa_polymorphic_call_context (t, ie->indirect_info->otr_type,
+                                             anc_offset);
+      if (ie->indirect_info->vptr_changed)
+       context.possible_dynamic_type_change (ie->in_polymorphic_cdtor,
+                                             ie->indirect_info->otr_type);
+    }
   else
     return NULL_TREE;


  parent reply	other threads:[~2015-01-16  4:39 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-12-22 21:42 [Bug ipa/64378] New: " zsojka at seznam dot cz
2014-12-22 21:58 ` [Bug ipa/64378] " dominiq at lps dot ens.fr
2015-01-09 11:20 ` rguenth at gcc dot gnu.org
2015-01-13 10:57 ` rguenth at gcc dot gnu.org
2015-01-16  4:39 ` hubicka at gcc dot gnu.org [this message]
2015-01-16  5:04 ` hubicka at gcc dot gnu.org
2015-01-18 17:32 ` hubicka at gcc dot gnu.org
2015-01-18 21:18 ` hubicka at gcc dot gnu.org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-64378-4-bhLYKo95ae@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).