------- Comment #28 from rguenth at gcc dot gnu dot org  2007-06-04 15:28 
-------
solution_set_add () looks like the culprit (thx micha).  So, the following will
fix it in case we have offsets only from COMPONENT_REFs, not from regular
pointer arithmetic (which is not true):

Index: tree-ssa-structalias.c
===================================================================
--- tree-ssa-structalias.c      (revision 125310)
+++ tree-ssa-structalias.c      (working copy)
@@ -715,13 +715,10 @@ solution_set_add (bitmap set, unsigned H
         less than end.  Otherwise, it is globbed to a single
         variable.  */

-      if ((get_varinfo (i)->offset + offset) < get_varinfo (i)->fullsize)
+      if (get_varinfo (i)->offset + get_varinfo (i)->size - 1 >= offset
+         && get_varinfo (i)->offset + offset < get_varinfo (i)->fullsize)
        {
-         unsigned HOST_WIDE_INT fieldoffset = get_varinfo (i)->offset +
offset;
-         varinfo_t v = first_vi_for_offset (get_varinfo (i), fieldoffset);
-         if (!v)
-           continue;
-         bitmap_set_bit (result, v->id);
+         bitmap_set_bit (result, i);
        }
       else if (get_varinfo (i)->is_artificial_var
               || get_varinfo (i)->has_union


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30252

Reply via email to