This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Fix alias verifier buglet


The alias verifier was only looking for may aliases inside memory tags. 
When we group aliases, regular variables will have may aliases as well.

This fixes the alias verification ICE in Ada.  Though I only made it so
far as to build stage2.  Ada dies while building stage3.

Bootstrapped and tested x86, x86-64 and ppc.


Diego.


	* tree-ssa.c (verify_flow_insensitive_alias_info): Process
	every variable that may have aliases, not just tags.

Index: tree-ssa.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/tree-ssa.c,v
retrieving revision 2.24
diff -d -c -p -r2.24 tree-ssa.c
*** tree-ssa.c	28 Jul 2004 05:13:08 -0000	2.24
--- tree-ssa.c	28 Jul 2004 17:47:40 -0000
*************** verify_flow_insensitive_alias_info (void
*** 348,375 ****
  
    for (i = 0; i < num_referenced_vars; i++)
      {
        var_ann_t ann;
  
        var = referenced_var (i);
        ann = var_ann (var);
  
!       if (ann->mem_tag_kind == TYPE_TAG || ann->mem_tag_kind == NAME_TAG)
  	{
! 	  size_t j;
! 	  varray_type may_aliases = ann->may_aliases;
! 
! 	  for (j = 0; may_aliases && j < VARRAY_ACTIVE_SIZE (may_aliases); j++)
! 	    {
! 	      tree alias = VARRAY_TREE (may_aliases, j);
  
! 	      bitmap_set_bit (visited, var_ann (alias)->uid);
  
! 	      if (!may_be_aliased (alias))
! 		{
! 		  error ("Non-addressable variable inside an alias set.");
! 		  debug_variable (alias);
! 		  goto err;
! 		}
  	    }
  	}
      }
--- 348,372 ----
  
    for (i = 0; i < num_referenced_vars; i++)
      {
+       size_t j;
        var_ann_t ann;
+       varray_type may_aliases;
  
        var = referenced_var (i);
        ann = var_ann (var);
+       may_aliases = ann->may_aliases;
  
!       for (j = 0; may_aliases && j < VARRAY_ACTIVE_SIZE (may_aliases); j++)
  	{
! 	  tree alias = VARRAY_TREE (may_aliases, j);
  
! 	  bitmap_set_bit (visited, var_ann (alias)->uid);
  
! 	  if (!may_be_aliased (alias))
! 	    {
! 	      error ("Non-addressable variable inside an alias set.");
! 	      debug_variable (alias);
! 	      goto err;
  	    }
  	}
      }



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]