aboutsummaryrefslogtreecommitdiff
path: root/gcc/fold-const.c
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2019-10-12 12:21:45 +0000
committerJakub Jelinek <jakub@redhat.com>2019-10-12 12:21:45 +0000
commit9256af6c1adad19dd8032ebfda112739298020fa (patch)
tree31ed1c2b11dab70a360c55ebd718030a25930484 /gcc/fold-const.c
parente780b44c0a06eac153b4620577171ea9f357d3f6 (diff)
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. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@276915 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/fold-const.c')
-rw-r--r--gcc/fold-const.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/gcc/fold-const.c b/gcc/fold-const.c
index a99dafec589..58b967e48fe 100644
--- a/gcc/fold-const.c
+++ b/gcc/fold-const.c
@@ -4447,8 +4447,7 @@ simple_operand_p_2 (tree exp)
{
enum tree_code code;
- if (TREE_SIDE_EFFECTS (exp)
- || tree_could_trap_p (exp))
+ if (TREE_SIDE_EFFECTS (exp) || generic_expr_could_trap_p (exp))
return false;
while (CONVERT_EXPR_P (exp))