OSDN Git Service

2010-04-30 Richard Guenther <rguenther@suse.de>
authorrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 30 Apr 2010 13:37:02 +0000 (13:37 +0000)
committerMasaki Muranaka <monaka@monami-software.com>
Sun, 23 May 2010 05:37:24 +0000 (14:37 +0900)
* tree-ssa-structalias.c (get_constraint_for_1): Generate
constraints for CONSTRUCTOR.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@158936 138bc75d-0d04-0410-961f-82ee72b054a4

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

index 31be263..91f0282 100644 (file)
@@ -1,5 +1,10 @@
 2010-04-30  Richard Guenther  <rguenther@suse.de>
 
 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.
        PR lto/43946
        * passes.c (init_optimization_passes): Move pass_ipa_free_lang_data
        first after all lowering passes.
index 88fa372..28bb0bb 100644 (file)
@@ -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;
            }
              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;
          default:;
          }
        break;