Commit 2a5bd62a by Jakub Jelinek Committed by Jakub Jelinek

re PR debug/40462 (ICE in dwarf2out_begin_epilogue, at dwarf2out.c:2773 while…

re PR debug/40462 (ICE in dwarf2out_begin_epilogue, at dwarf2out.c:2773 while compiling mlib-tgt.adb)

	PR debug/40462
	* jump.c (returnjump_p): Revert last patch.
	* dwarf2out.c (dwarf2out_begin_epilogue): Handle SEQUENCEs.

From-SVN: r149150
parent edd3a61c
2009-07-01 Jakub Jelinek <jakub@redhat.com>
PR debug/40462
* jump.c (returnjump_p): Revert last patch.
* dwarf2out.c (dwarf2out_begin_epilogue): Handle SEQUENCEs.
2009-07-01 John David Anglin <dave.anglin@nrc-cnrc.gc.ca> 2009-07-01 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
PR target/40575 PR target/40575
......
...@@ -2759,6 +2759,22 @@ dwarf2out_begin_epilogue (rtx insn) ...@@ -2759,6 +2759,22 @@ dwarf2out_begin_epilogue (rtx insn)
if (CALL_P (i) && SIBLING_CALL_P (i)) if (CALL_P (i) && SIBLING_CALL_P (i))
break; break;
if (GET_CODE (PATTERN (i)) == SEQUENCE)
{
int idx;
rtx seq = PATTERN (i);
if (returnjump_p (XVECEXP (seq, 0, 0)))
break;
if (CALL_P (XVECEXP (seq, 0, 0))
&& SIBLING_CALL_P (XVECEXP (seq, 0, 0)))
break;
for (idx = 0; idx < XVECLEN (seq, 0); idx++)
if (RTX_FRAME_RELATED_P (XVECEXP (seq, 0, idx)))
saw_frp = true;
}
if (RTX_FRAME_RELATED_P (i)) if (RTX_FRAME_RELATED_P (i))
saw_frp = true; saw_frp = true;
} }
......
...@@ -893,13 +893,8 @@ returnjump_p_1 (rtx *loc, void *data ATTRIBUTE_UNUSED) ...@@ -893,13 +893,8 @@ returnjump_p_1 (rtx *loc, void *data ATTRIBUTE_UNUSED)
int int
returnjump_p (rtx insn) returnjump_p (rtx insn)
{ {
/* Handle delayed branches. */
if (NONJUMP_INSN_P (insn) && GET_CODE (PATTERN (insn)) == SEQUENCE)
insn = XVECEXP (PATTERN (insn), 0, 0);
if (!JUMP_P (insn)) if (!JUMP_P (insn))
return 0; return 0;
return for_each_rtx (&PATTERN (insn), returnjump_p_1, NULL); return for_each_rtx (&PATTERN (insn), returnjump_p_1, NULL);
} }
......
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