diff options
author | rguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-04-30 08:22:15 +0000 |
---|---|---|
committer | rguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-04-30 08:22:15 +0000 |
commit | 4d6c561bfad8de02b048f8947a8f2ef803ca979c (patch) | |
tree | 44218b6855bc66127f9b11af7c5a184ffc5ce829 /gcc/tree-ssa-structalias.c | |
parent | 663870fcfbd8a82aa73cb4d24002416b3c3920df (diff) | |
download | gcc-4d6c561bfad8de02b048f8947a8f2ef803ca979c.tar.gz |
2010-04-30 Richard Guenther <rguenther@suse.de>
PR tree-optimization/43879
* tree-ssa-structalias.c (get_constraint_for_1): Properly
handle non-zero initializers.
* gcc.dg/torture/pr43879_1.c: New testcase.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@158924 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-ssa-structalias.c')
-rw-r--r-- | gcc/tree-ssa-structalias.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/gcc/tree-ssa-structalias.c b/gcc/tree-ssa-structalias.c index 08d3fa7e15b..928dc04d131 100644 --- a/gcc/tree-ssa-structalias.c +++ b/gcc/tree-ssa-structalias.c @@ -3285,8 +3285,10 @@ get_constraint_for_1 (tree t, VEC (ce_s, heap) **results, bool address_p) && ((TREE_CODE (t) == INTEGER_CST && integer_zerop (t)) /* The only valid CONSTRUCTORs in gimple with pointer typed - elements are zero-initializer. */ - || TREE_CODE (t) == CONSTRUCTOR)) + elements are zero-initializer. But in IPA mode we also + process global initializers, so verify at least. */ + || (TREE_CODE (t) == CONSTRUCTOR + && CONSTRUCTOR_NELTS (t) == 0))) { temp.var = nothing_id; temp.type = ADDRESSOF; |