public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "mikpe at it dot uu.se" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug rtl-optimization/49847] [4.7 Regression] NULL deref in fold_rtx (prev_insn_cc0 == NULL)
Date: Wed, 29 Feb 2012 19:19:00 -0000	[thread overview]
Message-ID: <bug-49847-4-FmoFfFIbV6@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-49847-4@http.gcc.gnu.org/bugzilla/>

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

--- Comment #17 from Mikael Pettersson <mikpe at it dot uu.se> 2012-02-29 19:13:12 UTC ---
(In reply to comment #16)
> Created attachment 26757 [details]
> make fold_rtx handle prev_insn_cc0 == NULL
> 
> The effect of Richard Guenther's r180192 patch to tree-eh.c is that "g >= 0.0"
> (or its gimple equivalent) is recognized as potentially trapping, which causes
> the cc0 setter and user to be put in separate BBs.  That's usually a no-no, but
> in the case of EH I'm not sure it can be avoided.  Then as fold_rtx processes
> the cc0 user at the start of the second BB, prev_insn_cc0 is NULL causing
> equiv_constant to crash.
> 
> With the attached patch fold_rtx simply doesn't try to fold the current rtx
> when prev_insn_cc0 is NULL.  A build of 4.7-20120225 as a cross to m68k-linux
> with java enabled succeeded with this patch applied, and it handled Andreas'
> c++ test case too.  I'm currently attempting a native bootstrap with both java
> and ada enabled.

The native bootstrap succeeded.


  parent reply	other threads:[~2012-02-29 19:13 UTC|newest]

Thread overview: 40+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-25 21:07 [Bug java/49847] New: m68k gcj-4.6 " tg at mirbsd dot org
2011-09-03 19:32 ` [Bug java/49847] " tg at mirbsd dot org
2011-12-12 10:02 ` mikpe at it dot uu.se
2011-12-15 21:01 ` [Bug rtl-optimization/49847] [4.6/4.7 Regression] " pinskia at gcc dot gnu.org
2011-12-16  9:18 ` jakub at gcc dot gnu.org
2012-01-20 22:07 ` mikpe at it dot uu.se
2012-01-21 16:13 ` tg at mirbsd dot org
2012-01-22  2:16 ` mikpe at it dot uu.se
2012-01-22 10:33 ` schwab@linux-m68k.org
2012-01-22 12:29 ` schwab@linux-m68k.org
2012-01-22 13:02 ` schwab@linux-m68k.org
2012-01-22 13:39 ` mikpe at it dot uu.se
2012-01-22 14:36 ` schwab@linux-m68k.org
2012-01-23 13:41 ` schwab@linux-m68k.org
2012-01-23 16:37 ` [Bug rtl-optimization/49847] [4.7 Regression] " schwab@linux-m68k.org
2012-01-23 20:22 ` schwab@linux-m68k.org
2012-02-05 21:57 ` mikpe at it dot uu.se
2012-02-07 15:50 ` mikpe at it dot uu.se
2012-02-26 22:37 ` mikpe at it dot uu.se
2012-02-29 19:19 ` mikpe at it dot uu.se [this message]
2012-03-22  8:43 ` [Bug rtl-optimization/49847] [4.7/4.8 " rguenth at gcc dot gnu.org
2012-06-14  8:22 ` rguenth at gcc dot gnu.org
2012-09-20 10:18 ` jakub at gcc dot gnu.org
2013-04-11  8:00 ` [Bug rtl-optimization/49847] [4.7/4.8/4.9 " rguenth at gcc dot gnu.org
2013-07-19 13:26 ` schwab@linux-m68k.org
2013-07-29 20:57 ` tg at mirbsd dot org
2014-02-07 22:58 ` law at redhat dot com
2014-02-14 18:39 ` law at redhat dot com
2014-02-15 13:13 ` steven at gcc dot gnu.org
2014-02-15 14:22 ` schwab@linux-m68k.org
2014-02-15 18:59 ` rguenther at suse dot de
2014-02-16 13:17 ` jackie.rosen at hushmail dot com
2014-02-17 10:01 ` rguenther at suse dot de
2014-02-25  6:14 ` law at redhat dot com
2014-02-25  8:41 ` rguenther at suse dot de
2014-02-27 19:03 ` law at gcc dot gnu.org
2014-06-12 13:43 ` [Bug rtl-optimization/49847] [4.7/4.8 " rguenth at gcc dot gnu.org
2014-12-19 13:35 ` [Bug rtl-optimization/49847] [4.8 " jakub at gcc dot gnu.org
2015-01-19 22:35 ` law at redhat dot com
2015-01-20  8:16 ` rguenth 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-49847-4-FmoFfFIbV6@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).