Commit 468660d3 by Steven Bosscher

emit-rtl.c (emit_label_before): Do not allow the same label to be emitted twice.

	* emit-rtl.c (emit_label_before): Do not allow the same label
	to be emitted twice.
	(emit_label_after): Likewise.
	(emit_label): Likewise.

From-SVN: r189521
parent 89ca6d79
2012-07-16 Steven Bosscher <steven@gcc.gnu.org> 2012-07-16 Steven Bosscher <steven@gcc.gnu.org>
* emit-rtl.c (emit_label_before): Do not allow the same label
to be emitted twice.
(emit_label_after): Likewise.
(emit_label): Likewise.
* flags.h (TYPE_OVERFLOW_WRAPS, TYPE_OVERFLOW_UNDEFINED, * flags.h (TYPE_OVERFLOW_WRAPS, TYPE_OVERFLOW_UNDEFINED,
TYPE_OVERFLOW_TRAPS, POINTER_TYPE_OVERFLOW_UNDEFINED): Move to tree.h. TYPE_OVERFLOW_TRAPS, POINTER_TYPE_OVERFLOW_UNDEFINED): Move to tree.h.
* tree.h (TYPE_OVERFLOW_WRAPS, TYPE_OVERFLOW_UNDEFINED, * tree.h (TYPE_OVERFLOW_WRAPS, TYPE_OVERFLOW_UNDEFINED,
......
...@@ -4220,14 +4220,9 @@ emit_barrier_before (rtx before) ...@@ -4220,14 +4220,9 @@ emit_barrier_before (rtx before)
rtx rtx
emit_label_before (rtx label, rtx before) emit_label_before (rtx label, rtx before)
{ {
/* This can be called twice for the same label as a result of the gcc_checking_assert (INSN_UID (label) == 0);
confusion that follows a syntax error! So make it harmless. */ INSN_UID (label) = cur_insn_uid++;
if (INSN_UID (label) == 0) add_insn_before (label, before, NULL);
{
INSN_UID (label) = cur_insn_uid++;
add_insn_before (label, before, NULL);
}
return label; return label;
} }
...@@ -4386,15 +4381,9 @@ emit_barrier_after (rtx after) ...@@ -4386,15 +4381,9 @@ emit_barrier_after (rtx after)
rtx rtx
emit_label_after (rtx label, rtx after) emit_label_after (rtx label, rtx after)
{ {
/* This can be called twice for the same label gcc_checking_assert (INSN_UID (label) == 0);
as a result of the confusion that follows a syntax error! INSN_UID (label) = cur_insn_uid++;
So make it harmless. */ add_insn_after (label, after, NULL);
if (INSN_UID (label) == 0)
{
INSN_UID (label) = cur_insn_uid++;
add_insn_after (label, after, NULL);
}
return label; return label;
} }
...@@ -4810,14 +4799,9 @@ emit_call_insn (rtx x) ...@@ -4810,14 +4799,9 @@ emit_call_insn (rtx x)
rtx rtx
emit_label (rtx label) emit_label (rtx label)
{ {
/* This can be called twice for the same label gcc_checking_assert (INSN_UID (label) == 0);
as a result of the confusion that follows a syntax error! INSN_UID (label) = cur_insn_uid++;
So make it harmless. */ add_insn (label);
if (INSN_UID (label) == 0)
{
INSN_UID (label) = cur_insn_uid++;
add_insn (label);
}
return label; return label;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment