diff options
author | Jakub Jelinek <jakub@redhat.com> | 2019-10-12 14:21:45 +0200 |
---|---|---|
committer | Jakub Jelinek <jakub@gcc.gnu.org> | 2019-10-12 14:21:45 +0200 |
commit | 853ce7c073eedfba1adfb63530a8bd2baa767137 (patch) | |
tree | 31ed1c2b11dab70a360c55ebd718030a25930484 /gcc/tree-ssa-sccvn.c | |
parent | 20de9568b49e663be848a35ce0bb08f63f14b5b2 (diff) |
re PR middle-end/92063 (ICE in operation_could_trap_p, at tree-eh.c:2528 when compiling Python's Python/_warnings.c)
PR middle-end/92063
* tree-eh.c (operation_could_trap_helper_p) <case COND_EXPR>
<case VEC_COND_EXPR>: Return false with *handled = false.
(tree_could_trap_p): For {,VEC_}COND_EXPR return false instead of
recursing on the first operand.
* fold-const.c (simple_operand_p_2): Use generic_expr_could_trap_p
instead of tree_could_trap_p.
* tree-ssa-sccvn.c (vn_nary_may_trap): Formatting fixes.
* gcc.c-torture/compile/pr92063.c: New test.
From-SVN: r276915
Diffstat (limited to 'gcc/tree-ssa-sccvn.c')
-rw-r--r-- | gcc/tree-ssa-sccvn.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/gcc/tree-ssa-sccvn.c b/gcc/tree-ssa-sccvn.c index 364d0d0ca4f..57331ab44dc 100644 --- a/gcc/tree-ssa-sccvn.c +++ b/gcc/tree-ssa-sccvn.c @@ -5105,18 +5105,15 @@ vn_nary_may_trap (vn_nary_op_t nary) honor_nans = flag_trapping_math && !flag_finite_math_only; honor_snans = flag_signaling_nans != 0; } - else if (INTEGRAL_TYPE_P (type) - && TYPE_OVERFLOW_TRAPS (type)) + else if (INTEGRAL_TYPE_P (type) && TYPE_OVERFLOW_TRAPS (type)) honor_trapv = true; } if (nary->length >= 2) rhs2 = nary->op[1]; ret = operation_could_trap_helper_p (nary->opcode, fp_operation, - honor_trapv, - honor_nans, honor_snans, rhs2, - &handled); - if (handled - && ret) + honor_trapv, honor_nans, honor_snans, + rhs2, &handled); + if (handled && ret) return true; for (i = 0; i < nary->length; ++i) |