summaryrefslogtreecommitdiff
path: root/gcc/gimple-ssa-strength-reduction.c
diff options
context:
space:
mode:
authorwschmidt <wschmidt@138bc75d-0d04-0410-961f-82ee72b054a4>2012-08-10 12:16:04 +0000
committerwschmidt <wschmidt@138bc75d-0d04-0410-961f-82ee72b054a4>2012-08-10 12:16:04 +0000
commitfd291195fb951dc73ca124b7bac2c44c4717e123 (patch)
tree10cd6b9145e6556cad83db51fb7aec54601c7deb /gcc/gimple-ssa-strength-reduction.c
parent097cb0d99463a6da1a0c28802f93b01b789e1689 (diff)
downloadgcc-fd291195fb951dc73ca124b7bac2c44c4717e123.tar.gz
gcc:
2012-08-10 Bill Schmidt <wschmidt@linux.vnet.ibm.com> PR middle-end/54211 * gimple-ssa-strength-reduction.c (analyze_candidates_and_replace): Use cand_type to determine whether pointer arithmetic will be generated. gcc/testsuite: 2012-08-10 Bill Schmidt <wschmidt@linux.vnet.ibm.com> PR middle-end/54211 * gcc.dg/tree-ssa/pr54211.c: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@190294 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 ccc361e900a..237c0c9b425 100644
--- a/gcc/gimple-ssa-strength-reduction.c
+++ b/gcc/gimple-ssa-strength-reduction.c
@@ -2534,7 +2534,7 @@ analyze_candidates_and_replace (void)
/* Determine whether we'll be generating pointer arithmetic
when replacing candidates. */
address_arithmetic_p = (c->kind == CAND_ADD
- && POINTER_TYPE_P (TREE_TYPE (c->base_expr)));
+ && POINTER_TYPE_P (c->cand_type));
/* If all candidates have already been replaced under other
interpretations, nothing remains to be done. */