OSDN Git Service

2006-01-10 Richard Guenther <rguenther@suse.de>
authorrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 10 Jan 2006 14:55:59 +0000 (14:55 +0000)
committerrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 10 Jan 2006 14:55:59 +0000 (14:55 +0000)
* tree-ssa-structalias.c (get_constraint_for_component_ref):
Never override with anything constraint.

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

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

index ad3f304..4d6c661 100644 (file)
@@ -1,3 +1,8 @@
+2006-01-10  Richard Guenther  <rguenther@suse.de>
+
+       * tree-ssa-structalias.c (get_constraint_for_component_ref):
+       Never override with anything constraint.
+
 2006-01-10  Jan Beulich  <jbeulich@novell.com>
 
        * config/i386/i386.c (ix86_data_alignment): Don't force alignment to
 2006-01-10  Jan Beulich  <jbeulich@novell.com>
 
        * config/i386/i386.c (ix86_data_alignment): Don't force alignment to
index 63ba8d4..e7b47fc 100644 (file)
@@ -2373,25 +2373,14 @@ get_constraint_for_component_ref (tree t, VEC(ce_s, heap) **results)
   t = get_ref_base_and_extent (t, &bitpos, &bitsize, &bitmaxsize);
   get_constraint_for (t, results);
   result = VEC_last (ce_s, *results);
   t = get_ref_base_and_extent (t, &bitpos, &bitsize, &bitmaxsize);
   get_constraint_for (t, results);
   result = VEC_last (ce_s, *results);
+  result->offset = bitpos;
 
   gcc_assert (beforelength + 1 == VEC_length (ce_s, *results));
 
   /* This can also happen due to weird offsetof type macros.  */
   if (TREE_CODE (t) != ADDR_EXPR && result->type == ADDRESSOF)
     result->type = SCALAR;
 
   gcc_assert (beforelength + 1 == VEC_length (ce_s, *results));
 
   /* This can also happen due to weird offsetof type macros.  */
   if (TREE_CODE (t) != ADDR_EXPR && result->type == ADDRESSOF)
     result->type = SCALAR;
-  
-  /* If we know where this goes, then yay. Otherwise, booo. */
-  if (bitmaxsize != -1
-      && bitsize == bitmaxsize)
-    {
-      result->offset = bitpos;
-    }
-  else
-    {
-      result->var = anything_id;
-      result->offset = 0;      
-    }
-
   if (result->type == SCALAR)
     {
       /* In languages like C, you can access one past the end of an
   if (result->type == SCALAR)
     {
       /* In languages like C, you can access one past the end of an
@@ -2409,7 +2398,7 @@ get_constraint_for_component_ref (tree t, VEC(ce_s, heap) **results)
          for (curr = get_varinfo (result->var); curr; curr = curr->next)
            {
              if (offset_overlaps_with_access (curr->offset, curr->size,
          for (curr = get_varinfo (result->var); curr; curr = curr->next)
            {
              if (offset_overlaps_with_access (curr->offset, curr->size,
-                                              result->offset, bitsize))
+                                              result->offset, bitmaxsize))
                {
                  result->var = curr->id;
                  break;
                {
                  result->var = curr->id;
                  break;