diff options
author | nemet <nemet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-04-12 19:36:50 +0000 |
---|---|---|
committer | nemet <nemet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-04-12 19:36:50 +0000 |
commit | 80621b930c5d876c944b9811332a957300f9c92f (patch) | |
tree | 7da62a2d8311cb87cbf1676d15fee403e936898e /gcc/except.c | |
parent | ac89ce58c371c411dbdd9f3166ed246e0a5516ff (diff) | |
download | gcc-80621b930c5d876c944b9811332a957300f9c92f.tar.gz |
PR middle-end/39651
* except.c (can_throw_external): Look at each insn in a SEQUENCE
when deciding whether the whole SEQUENCE can throw.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@145986 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/except.c')
-rw-r--r-- | gcc/except.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/gcc/except.c b/gcc/except.c index a0a81bcecf8..889dd617603 100644 --- a/gcc/except.c +++ b/gcc/except.c @@ -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) |