public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "jamborm at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug tree-optimization/63551] [4.9/5 Regression] wrong code (segfaults) at -Os on x86_64-linux-gnu
Date: Fri, 21 Nov 2014 15:11:00 -0000	[thread overview]
Message-ID: <bug-63551-4-huXHJnhFgw@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-63551-4@http.gcc.gnu.org/bugzilla/>

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

--- Comment #5 from Martin Jambor <jamborm at gcc dot gnu.org> ---
(In reply to Jan Hubicka from comment #3)
> indeed, somewhere we need to view convert the aggregate value... Predicates
> works on conditions on arguments, so I suppose this ought to happen at
> ipa-prop side. Martin?

I disagree, ipa-prop jump functions describe what values callers pass
to callees, it is the conditions of the predicates that need do
describe what then happens to these values, including any conversions.

Anyway, I am bootstrapping the following fix:

Index: src/gcc/ipa-inline-analysis.c
===================================================================
--- src.orig/gcc/ipa-inline-analysis.c
+++ src/gcc/ipa-inline-analysis.c
@@ -880,6 +880,7 @@ evaluate_conditions_for_known_args (stru
     }
       if (c->code == IS_NOT_CONSTANT || c->code == CHANGED)
     continue;
+      val = fold_convert (TREE_TYPE (c->val), val);
       res = fold_binary_to_constant (c->code, boolean_type_node, val, c->val);
       if (res && integer_zerop (res))
     continue;


  parent reply	other threads:[~2014-11-21 15:11 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-16  4:41 [Bug tree-optimization/63551] New: " su at cs dot ucdavis.edu
2014-10-16  9:47 ` [Bug tree-optimization/63551] [4.9/5 Regression] " rguenth at gcc dot gnu.org
2014-10-16  9:50 ` rguenth at gcc dot gnu.org
2014-11-18 15:00 ` jakub at gcc dot gnu.org
2014-11-20 12:25 ` rguenth at gcc dot gnu.org
2014-11-21 15:11 ` jamborm at gcc dot gnu.org [this message]
2014-11-21 20:16 ` jamborm at gcc dot gnu.org
2014-12-01 12:06 ` jamborm at gcc dot gnu.org
2014-12-01 12:53 ` jamborm at gcc dot gnu.org
2014-12-01 14:05 ` jamborm at gcc dot gnu.org
2014-12-03 15:20 ` jamborm at gcc dot gnu.org
2014-12-13  9:49 ` jakub at gcc dot gnu.org
2014-12-15  9:01 ` jamborm at gcc dot gnu.org
2014-12-15 10:45 ` jakub at gcc dot gnu.org
2015-04-30 18:01 ` mpolacek at gcc dot gnu.org
2015-04-30 18:04 ` mpolacek at gcc dot gnu.org
2015-04-30 18:06 ` mpolacek at gcc dot gnu.org
2015-04-30 18:42 ` mpolacek 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-63551-4-huXHJnhFgw@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).