re PR middle-end/39651 (New cleanup test failures)

PR middle-end/39651
	* except.c (can_throw_external): Look at each insn in a SEQUENCE
	when deciding whether the whole SEQUENCE can throw.

From-SVN: r145986
This commit is contained in:
Adam Nemet 2009-04-12 19:36:50 +00:00 committed by Adam Nemet
parent 4c48007b43
commit efaadb930b
2 changed files with 16 additions and 1 deletions

View File

@ -1,3 +1,9 @@
2009-04-12 Adam Nemet <anemet@caviumnetworks.com>
PR middle-end/39651
* except.c (can_throw_external): Look at each insn in a SEQUENCE
when deciding whether the whole SEQUENCE can throw.
2009-04-12 Uros Bizjak <ubizjak@gmail.com>
PR target/39740

View File

@ -2892,7 +2892,16 @@ can_throw_external (const_rtx insn)
if (NONJUMP_INSN_P (insn)
&& GET_CODE (PATTERN (insn)) == SEQUENCE)
insn = XVECEXP (PATTERN (insn), 0, 0);
{
rtx seq = PATTERN (insn);
int i, n = XVECLEN (seq, 0);
for (i = 0; i < n; i++)
if (can_throw_external (XVECEXP (seq, 0, i)))
return true;
return false;
}
note = find_reg_note (insn, REG_EH_REGION, NULL_RTX);
if (!note)