aboutsummaryrefslogtreecommitdiff
path: root/gcc/flow.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/flow.c')
-rw-r--r--gcc/flow.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/gcc/flow.c b/gcc/flow.c
index 2905917..d9e3ae3 100644
--- a/gcc/flow.c
+++ b/gcc/flow.c
@@ -2110,6 +2110,10 @@ insn_dead_p (pbi, x, call_ok, notes)
{
enum rtx_code code = GET_CODE (x);
+ /* Don't eliminate insns that may trap. */
+ if (flag_non_call_exceptions && may_trap_p (x))
+ return 0;
+
#ifdef AUTO_INC_DEC
/* As flow is invoked after combine, we must take existing AUTO_INC
expressions into account. */