diff options
author | Ian Lance Taylor <iant@google.com> | 2010-10-23 16:18:32 +0000 |
---|---|---|
committer | Ian Lance Taylor <ian@gcc.gnu.org> | 2010-10-23 16:18:32 +0000 |
commit | 0e1b8b109fb5a19dc3576a14416383299566ff00 (patch) | |
tree | cf7659287d28d44a74afdea7975d98bd017ddb0d /gcc/simplify-rtx.c | |
parent | 67f67405cb4f5fec7950c18f5e15da06d4852acb (diff) | |
download | gcc-0e1b8b109fb5a19dc3576a14416383299566ff00.zip gcc-0e1b8b109fb5a19dc3576a14416383299566ff00.tar.gz gcc-0e1b8b109fb5a19dc3576a14416383299566ff00.tar.bz2 |
tree-vrp.c (extract_range_from_binary_expr): If flag_non_call_exceptions don't eliminate division by zero.
gcc/:
* tree-vrp.c (extract_range_from_binary_expr): If
flag_non_call_exceptions don't eliminate division by zero.
* simplify-rtx.c (simplify_binary_operation_1): Likewise.
gcc/testsuite/:
* gcc.c-torture/execute/20101011-1.c: New test.
* gcc.c-torture/execute/20101011-1.x: New test driver.
From-SVN: r165884
Diffstat (limited to 'gcc/simplify-rtx.c')
-rw-r--r-- | gcc/simplify-rtx.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/simplify-rtx.c b/gcc/simplify-rtx.c index e45917f..84f3863 100644 --- a/gcc/simplify-rtx.c +++ b/gcc/simplify-rtx.c @@ -2755,7 +2755,8 @@ simplify_binary_operation_1 (enum rtx_code code, enum machine_mode mode, else { /* 0/x is 0 (or x&0 if x has side-effects). */ - if (trueop0 == CONST0_RTX (mode)) + if (trueop0 == CONST0_RTX (mode) + && !cfun->can_throw_non_call_exceptions) { if (side_effects_p (op1)) return simplify_gen_binary (AND, mode, op1, trueop0); |