This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/16089] [3.5 regression] unwind-dw2.c:1311: error: insn outside basic block
- From: "pinskia at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 20 Jun 2004 05:33:18 -0000
- Subject: [Bug middle-end/16089] [3.5 regression] unwind-dw2.c:1311: error: insn outside basic block
- References: <20040619211536.16089.danglin@gcc.gnu.org>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-06-20 05:33 -------
I have patch. David could you test this for me?
Index: integrate.c
===============================================================
====
RCS file: /cvs/gcc/gcc/gcc/integrate.c,v
retrieving revision 1.257
diff -u -p -r1.257 integrate.c
--- integrate.c 15 Jun 2004 18:02:25 -0000 1.257
+++ integrate.c 20 Jun 2004 05:33:03 -0000
@@ -1284,6 +1284,13 @@ has_hard_reg_initial_val (enum machine_m
return has_func_hard_reg_initial_val (cfun, gen_rtx_REG (mode, regno));
}
+/* Return RTX to emit after when we want to emit code on the entry of function. */
+static rtx
+entry_of_function (void)
+{
+ return (n_basic_blocks ? BB_HEAD (ENTRY_BLOCK_PTR->next_bb) : get_insns ());
+}
+
void
emit_initial_value_sets (void)
{
@@ -1300,7 +1307,7 @@ emit_initial_value_sets (void)
seq = get_insns ();
end_sequence ();
- emit_insn_after (seq, get_insns ());
+ emit_insn_after (seq, entry_of_function ());
}
/* If the backend knows where to allocate pseudos for hard
--
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|unassigned at gcc dot gnu |pinskia at gcc dot gnu dot
|dot org |org
Status|NEW |ASSIGNED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16089