aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Guenther <rguenther@suse.de>2010-04-30 13:37:02 +0000
committerRichard Biener <rguenth@gcc.gnu.org>2010-04-30 13:37:02 +0000
commit47d8a9035d8f06abf06094071b500d54ed8ef17c (patch)
tree602dfa85a9ddcf6e4cf3951be72e481f89d4f78b
parentb6050cb77f23aaeedb3f4e223dbebe33143ff774 (diff)
downloadgcc-47d8a9035d8f06abf06094071b500d54ed8ef17c.zip
gcc-47d8a9035d8f06abf06094071b500d54ed8ef17c.tar.gz
gcc-47d8a9035d8f06abf06094071b500d54ed8ef17c.tar.bz2
tree-ssa-structalias.c (get_constraint_for_1): Generate constraints for CONSTRUCTOR.
2010-04-30 Richard Guenther <rguenther@suse.de> * tree-ssa-structalias.c (get_constraint_for_1): Generate constraints for CONSTRUCTOR. From-SVN: r158936
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/tree-ssa-structalias.c20
2 files changed, 25 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 31be263..91f0282 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,5 +1,10 @@
2010-04-30 Richard Guenther <rguenther@suse.de>
+ * tree-ssa-structalias.c (get_constraint_for_1): Generate
+ constraints for CONSTRUCTOR.
+
+2010-04-30 Richard Guenther <rguenther@suse.de>
+
PR lto/43946
* passes.c (init_optimization_passes): Move pass_ipa_free_lang_data
first after all lowering passes.
diff --git a/gcc/tree-ssa-structalias.c b/gcc/tree-ssa-structalias.c
index 88fa372..28bb0bb 100644
--- a/gcc/tree-ssa-structalias.c
+++ b/gcc/tree-ssa-structalias.c
@@ -3351,6 +3351,26 @@ get_constraint_for_1 (tree t, VEC (ce_s, heap) **results, bool address_p)
get_constraint_for_ssa_var (t, results, address_p);
return;
}
+ case CONSTRUCTOR:
+ {
+ unsigned int i;
+ tree val;
+ VEC (ce_s, heap) *tmp = NULL;
+ FOR_EACH_CONSTRUCTOR_VALUE (CONSTRUCTOR_ELTS (t), i, val)
+ {
+ struct constraint_expr *rhsp;
+ unsigned j;
+ get_constraint_for_1 (val, &tmp, address_p);
+ for (j = 0; VEC_iterate (ce_s, tmp, j, rhsp); ++j)
+ VEC_safe_push (ce_s, heap, *results, rhsp);
+ VEC_truncate (ce_s, tmp, 0);
+ }
+ VEC_free (ce_s, heap, tmp);
+ /* We do not know whether the constructor was complete,
+ so technically we have to add &NOTHING or &ANYTHING
+ like we do for an empty constructor as well. */
+ return;
+ }
default:;
}
break;