aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-if-conv.c
diff options
context:
space:
mode:
authorPrathamesh Kulkarni <prathamesh.kulkarni@linaro.org>2019-10-15 07:19:41 +0000
committerPrathamesh Kulkarni <prathamesh3492@gcc.gnu.org>2019-10-15 07:19:41 +0000
commit3c8e341b996546607fa1f39a0fd9a9d7c2c38214 (patch)
tree6003d1912201949e1194f1a78591b9b8ce639548 /gcc/tree-if-conv.c
parent51992f15a7d9adce1016f8c31d37409e50d5797f (diff)
re PR tree-optimization/92085 (ICE: tree check: expected class 'type', have 'exceptional' (error_mark) in useless_type_conversion_p, at gimple-expr.c:86)
2019-10-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org> PR tree-optimization/92085 * tree-if-conv.c (ifcvt_local_dce): Call gsi_next in else clause, instead of calling it unconditionally after delete_dead_or_redundant_assignment and fix indentation. testsuite/ * gcc.dg/tree-ssa/pr92085-1.c: New test. * gcc.dg/tree-ssa/pr92085-2.c: Likewise. From-SVN: r276984
Diffstat (limited to 'gcc/tree-if-conv.c')
-rw-r--r--gcc/tree-if-conv.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/gcc/tree-if-conv.c b/gcc/tree-if-conv.c
index af49813b0d1..3c296ec3002 100644
--- a/gcc/tree-if-conv.c
+++ b/gcc/tree-if-conv.c
@@ -2973,10 +2973,11 @@ ifcvt_local_dce (class loop *loop)
ao_ref write;
ao_ref_init (&write, lhs);
- if (dse_classify_store (&write, stmt, false, NULL, NULL, latch_vdef)
- == DSE_STORE_DEAD)
- delete_dead_or_redundant_assignment (&gsi, "dead");
- gsi_next (&gsi);
+ if (dse_classify_store (&write, stmt, false, NULL, NULL, latch_vdef)
+ == DSE_STORE_DEAD)
+ delete_dead_or_redundant_assignment (&gsi, "dead");
+ else
+ gsi_next (&gsi);
continue;
}