OSDN Git Service

2010-04-30 Richard Guenther <rguenther@suse.de>
authorrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 30 Apr 2010 08:22:15 +0000 (08:22 +0000)
committerMasaki Muranaka <monaka@monami-software.com>
Sun, 23 May 2010 05:37:14 +0000 (14:37 +0900)
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

gcc/ChangeLog
gcc/testsuite/ChangeLog
gcc/tree-ssa-structalias.c

index d20e202..936a838 100644 (file)
@@ -1,5 +1,11 @@
 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.
+
+2010-04-30  Richard Guenther  <rguenther@suse.de>
+
        * builtins.c (fold_builtin_1): Delete free (0).
 
 2010-04-29  Jan HUbicka  <jh@suse.cz>
index 45f0023..dbc2308 100644 (file)
@@ -1,5 +1,10 @@
 2010-04-30  Richard Guenther  <rguenther@suse.de>
 
+       PR tree-optimization/43879
+       * gcc.dg/torture/pr43879_1.c: New testcase.
+
+2010-04-30  Richard Guenther  <rguenther@suse.de>
+
        * gcc.dg/tree-ssa/builtin-free.c: New testcase.
 
 2010-04-29  Fabien ChĂȘne  <fabien.chene@gmail.com>
index 08d3fa7..928dc04 100644 (file)
@@ -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;