On 03/11/16 13:01, Bernd Schmidt wrote:
Index: gcc/emit-rtl.c
===================================================================
--- gcc/emit-rtl.c (revision 241233)
+++ gcc/emit-rtl.c (working copy)
@@ -6169,17 +6169,18 @@ emit_copy_of_insn_after (rtx_insn *insn,
which may be duplicated by the basic block reordering code. */
RTX_FRAME_RELATED_P (new_rtx) = RTX_FRAME_RELATED_P (insn);
+ /* Locate the end of existing REG_NOTES in NEW_RTX. */
+ rtx *ptail = ®_NOTES (new_rtx);
+ gcc_assert (*ptail == NULL_RTX);
+
Looks like new_rtx may contain it's own REG_NOTES when reached here thus
triggered ICE, I guess mark_jump_label may generate REG_LABEL_OPERAND as the
comments says.
After replace the gcc_assert with the following loop, this patch passed
bootstrap on both AArch64 and X86-64, and regression OK on gcc and g++.
+ while (*ptail != NULL_RTX)
+ ptail = &XEXP (*ptail, 1);
Regards,
Jiong