summaryrefslogtreecommitdiff
path: root/gcc/gimple-ssa-strength-reduction.c
diff options
context:
space:
mode:
authorjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>2017-12-06 19:27:41 +0000
committerjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>2017-12-06 19:27:41 +0000
commit4970bf23fef8e7b07763a80b608e121244605d10 (patch)
treee387cb5a2e1f0fcea19d32c4f7ecb352b4dcb73d /gcc/gimple-ssa-strength-reduction.c
parentc475a16d1f4ea8d6ba1b7d5fac3e7688acf3f2b0 (diff)
downloadgcc-4970bf23fef8e7b07763a80b608e121244605d10.tar.gz
PR tree-optimization/83293
* gimple-ssa-strength-reduction.c (insert_initializers): Use GSI_NEW_STMT instead of GSI_SAME_STMT in gsi_insert_after that might insert into empty bb. * g++.dg/torture/pr83293.C: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@255451 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/gimple-ssa-strength-reduction.c')
-rw-r--r--gcc/gimple-ssa-strength-reduction.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/gimple-ssa-strength-reduction.c b/gcc/gimple-ssa-strength-reduction.c
index 42320ff6682..b51239b94d0 100644
--- a/gcc/gimple-ssa-strength-reduction.c
+++ b/gcc/gimple-ssa-strength-reduction.c
@@ -3418,7 +3418,7 @@ insert_initializers (slsr_cand_t c)
gsi_insert_after (&gsi, cast_stmt, GSI_NEW_STMT);
gimple_set_location (cast_stmt, loc);
}
- gsi_insert_after (&gsi, init_stmt, GSI_SAME_STMT);
+ gsi_insert_after (&gsi, init_stmt, GSI_NEW_STMT);
}
gimple_set_location (init_stmt, gimple_location (basis_stmt));