------- Additional Comments From dnovillo at gcc dot gnu dot org  2005-06-30 
21:20 -------

Testing fix.  When creating new name tags, we should also consider pointers that
are not being dereferenced.  They may have inherited a name tag from copy
propagation or SSA update.  Will commit after testing.


Index: tree-ssa-alias.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/tree-ssa-alias.c,v
retrieving revision 2.98
diff -d -u -p -r2.98 tree-ssa-alias.c
--- tree-ssa-alias.c    25 Jun 2005 02:01:32 -0000      2.98
+++ tree-ssa-alias.c    30 Jun 2005 21:18:44 -0000
@@ -782,10 +782,15 @@ create_name_tags (struct alias_info *ai)
 {
   size_t i;

-  for (i = 0; i < VARRAY_ACTIVE_SIZE (ai->processed_ptrs); i++)
+  for (i = 1; i < num_ssa_names; i++)
     {
-      tree ptr = VARRAY_TREE (ai->processed_ptrs, i);
-      struct ptr_info_def *pi = SSA_NAME_PTR_INFO (ptr);
+      tree ptr = ssa_name (i);
+      struct ptr_info_def *pi;
+
+      if (ptr == NULL_TREE || !POINTER_TYPE_P (TREE_TYPE (ptr)))
+       continue;
+
+      pi = SSA_NAME_PTR_INFO (ptr);

       if (pi->pt_anything || !pi->is_dereferenced)
        {


-- 


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

Reply via email to