aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-ssa-structalias.c
diff options
context:
space:
mode:
authorRichard Guenther <rguenther@suse.de>2011-07-14 14:53:30 +0000
committerRichard Biener <rguenth@gcc.gnu.org>2011-07-14 14:53:30 +0000
commit1a5d20a4e01472c30e360f94b33373f1ab8e2354 (patch)
tree334b0e2f5c2ac0f46d98e0984a48323ca8f7287f /gcc/tree-ssa-structalias.c
parent5fbcc0ed20ecdfd980106ac22607c5baed60d234 (diff)
downloadgcc-1a5d20a4e01472c30e360f94b33373f1ab8e2354.zip
gcc-1a5d20a4e01472c30e360f94b33373f1ab8e2354.tar.gz
gcc-1a5d20a4e01472c30e360f94b33373f1ab8e2354.tar.bz2
re PR tree-optimization/49651 (nested lambdas and -O3 produced incorrect integer variable increments)
2011-07-14 Richard Guenther <rguenther@suse.de> PR tree-optimization/49651 * tree-ssa-structalias.c (get_constraint_for_1): Properly handle dereferences with subvariables. * gcc.dg/torture/pr49651.c: New testcase. From-SVN: r176274
Diffstat (limited to 'gcc/tree-ssa-structalias.c')
-rw-r--r--gcc/tree-ssa-structalias.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/gcc/tree-ssa-structalias.c b/gcc/tree-ssa-structalias.c
index 6a9732f..82f39c2 100644
--- a/gcc/tree-ssa-structalias.c
+++ b/gcc/tree-ssa-structalias.c
@@ -3258,9 +3258,18 @@ get_constraint_for_1 (tree t, VEC (ce_s, heap) **results, bool address_p,
/* If we are not taking the address then make sure to process
all subvariables we might access. */
+ if (address_p)
+ return;
+
cs = *VEC_last (ce_s, *results);
- if (address_p
- || cs.type != SCALAR)
+ if (cs.type == DEREF)
+ {
+ /* For dereferences this means we have to defer it
+ to solving time. */
+ VEC_last (ce_s, *results)->offset = UNKNOWN_OFFSET;
+ return;
+ }
+ if (cs.type != SCALAR)
return;
vi = get_varinfo (cs.var);