diff options
author | Eric Botcazou <ebotcazou@libertysurf.fr> | 2007-04-19 13:19:16 +0200 |
---|---|---|
committer | Eric Botcazou <ebotcazou@gcc.gnu.org> | 2007-04-19 11:19:16 +0000 |
commit | d47a8b8331c719df4f7c44af84eec7a63092a440 (patch) | |
tree | 7a67687eb802bd0acdf8b565692414e4370ea6b1 /gcc/cfgbuild.c | |
parent | a777d6e96715af95b710dc3fbd2f7ef3b5d7a767 (diff) | |
download | gcc-d47a8b8331c719df4f7c44af84eec7a63092a440.zip gcc-d47a8b8331c719df4f7c44af84eec7a63092a440.tar.gz gcc-d47a8b8331c719df4f7c44af84eec7a63092a440.tar.bz2 |
re PR rtl-optimization/29841 (ICE with scheduling and __builtin_trap)
PR rtl-optimization/29841
* cfgbuild.c (control_flow_insn_p): Return TRUE for unconditional
trap instructions.
* sched-deps.c (sched_analyze_insn): Prevent all non-jump instructions
that may cause control flow transfer from being moved.
From-SVN: r123970
Diffstat (limited to 'gcc/cfgbuild.c')
-rw-r--r-- | gcc/cfgbuild.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/gcc/cfgbuild.c b/gcc/cfgbuild.c index 3d05ebc..642efc3 100644 --- a/gcc/cfgbuild.c +++ b/gcc/cfgbuild.c @@ -120,6 +120,11 @@ control_flow_insn_p (rtx insn) || can_throw_internal (insn)); case INSN: + /* Treat trap instructions like noreturn calls (same provision). */ + if (GET_CODE (PATTERN (insn)) == TRAP_IF + && XEXP (PATTERN (insn), 0) == const1_rtx) + return true; + return (flag_non_call_exceptions && can_throw_internal (insn)); case BARRIER: |