This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug regression/56131] [4.8 regression] gcc.dg/pr56035.c ICEs gcc on sparc-linux
- From: "vries at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 29 Jan 2013 00:28:38 +0000
- Subject: [Bug regression/56131] [4.8 regression] gcc.dg/pr56035.c ICEs gcc on sparc-linux
- Auto-submitted: auto-generated
- References: <bug-56131-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56131
--- Comment #3 from vries at gcc dot gnu.org 2013-01-29 00:28:38 UTC ---
Using NOTE_BASIC_BLOCK instead of BLOCK_FOR_INSN on bb_note allows us to get
the bb.
This tentative patch:
...
Index: cfgrtl.c
===================================================================
--- cfgrtl.c (revision 195240)
+++ cfgrtl.c (working copy)
@@ -144,9 +144,11 @@ delete_insn (rtx insn)
NOTE_DELETED_LABEL_NAME (insn) = name;
if (bb_note != NULL_RTX && NOTE_INSN_BASIC_BLOCK_P (bb_note)
- && BLOCK_FOR_INSN (bb_note) == bb)
+ && (bb == NULL
+ || NOTE_BASIC_BLOCK (bb_note) == bb))
{
reorder_insns_nobb (insn, insn, bb_note);
+ bb = NOTE_BASIC_BLOCK (bb_note);
BB_HEAD (bb) = bb_note;
if (BB_END (bb) == bb_note)
BB_END (bb) = insn;
...
gives the following result:
...
(note 23 221 22 [bb 3] NOTE_INSN_BASIC_BLOCK)
(note 22 23 67 ("lbl1") NOTE_INSN_DELETED_LABEL 3)
...