diff options
author | Jakub Jelinek <jakub@gcc.gnu.org> | 2019-10-30 10:52:01 +0100 |
---|---|---|
committer | Jakub Jelinek <jakub@gcc.gnu.org> | 2019-10-30 10:52:01 +0100 |
commit | 9f33e12137b0216052c230fb653b130828ad575d (patch) | |
tree | fe0fbc2360bda4a08182c72407ada5d6b688adaf /gcc/tree-ssa-loop-ivopts.c | |
parent | fd776d2834d40b6b49e1e2880d4cbde7f568ba29 (diff) | |
download | gcc-9f33e12137b0216052c230fb653b130828ad575d.zip gcc-9f33e12137b0216052c230fb653b130828ad575d.tar.gz gcc-9f33e12137b0216052c230fb653b130828ad575d.tar.bz2 |
re PR tree-optimization/92262 (ICE: verify_gimple failed (error: incorrect sharing of tree nodes))
PR tree-optimization/92262
* tree-ssa-loop-ivopts.c (get_debug_computation_at): Don't unshare
ubase or cbase here.
(remove_unused_ivs): Unshare comp before using it.
* g++.dg/opt/pr92262.C: New test.
From-SVN: r277605
Diffstat (limited to 'gcc/tree-ssa-loop-ivopts.c')
-rw-r--r-- | gcc/tree-ssa-loop-ivopts.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/gcc/tree-ssa-loop-ivopts.c b/gcc/tree-ssa-loop-ivopts.c index 74a3ac3..5938cfe 100644 --- a/gcc/tree-ssa-loop-ivopts.c +++ b/gcc/tree-ssa-loop-ivopts.c @@ -4152,8 +4152,6 @@ get_debug_computation_at (class loop *loop, gimple *at, var = fold_convert (ctype, var); } - ubase = unshare_expr (ubase); - cbase = unshare_expr (cbase); if (stmt_after_increment (loop, cand, at)) var = fold_build2 (MINUS_EXPR, TREE_TYPE (var), var, unshare_expr (cstep)); @@ -7648,6 +7646,7 @@ remove_unused_ivs (struct ivopts_data *data, bitmap toremove) if (!best_cand) continue; + comp = unshare_expr (comp); if (count > 1) { tree vexpr = make_node (DEBUG_EXPR_DECL); |