summaryrefslogtreecommitdiff
path: root/gcc/flow.c
diff options
context:
space:
mode:
authoraph <aph@138bc75d-0d04-0410-961f-82ee72b054a4>2002-10-01 12:19:36 +0000
committeraph <aph@138bc75d-0d04-0410-961f-82ee72b054a4>2002-10-01 12:19:36 +0000
commit8ca56a3b4098543949892fa278f23a83b87d5e5b (patch)
tree150e6abd5f8f691ae4cd7d2c2f60135ff3b9682d /gcc/flow.c
parente37591328350c2127733aa35f9a3013d4619478c (diff)
downloadgcc-8ca56a3b4098543949892fa278f23a83b87d5e5b.tar.gz
2002-09-30 Andrew Haley <aph@redhat.com>
* flow.c (insn_dead_p): When using non-call-exceptions, don't eliminate insns that may trap. * cse.c (insn_live_p): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@57688 138bc75d-0d04-0410-961f-82ee72b054a4
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 2905917cbcc..d9e3ae3ce40 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. */