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]

Re: GCC build failed for native with your patch on 2004-01-12T17:28:05Z.


> Caused by:
> +2004-01-12  Jan Hubicka  <jh@suse.cz>
> +
> +	* alias.c:  Invlude varray.h
> +	(alias_sets): Turn into varray.
> +	(get_alias_set_entry): Use VARRAY; mark inline.
> +	(mems_in_disjoint_alias_sets_p): Mark inline.
> +	(record_alias_subset): Use varray.
> +	(init_alias_once): Initialize varray.
> +	(new_alias_set): Grow array.
> +	* varray.c: Make VARRAY_GENERIC_PTR non GTYized.
> 
> The problem is that the rs6000 backend calls new_alias_set before 
> alias_sets gets
> initialized.
> 
> Jan is already working on fixing this.
As Andrew pointed out, the problem is that PPC backend construct alias
set before init_alias_once is done.  The attached patch should fix it
and it cause no runtime harm.  I will commit it as obvious if it passes
testing on i386.

2004-01-12  Jan Hubicka  <jh@suse.cz>
	* alias.c (new_alias_set): Construct the alias_set varray.
	(init_alias_once): Don't do it here.
Index: alias.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/alias.c,v
retrieving revision 1.206
diff -c -3 -p -r1.206 alias.c
*** alias.c	12 Jan 2004 11:15:32 -0000	1.206
--- alias.c	12 Jan 2004 19:10:54 -0000
*************** new_alias_set (void)
*** 598,604 ****
  
    if (flag_strict_aliasing)
      {
!       VARRAY_GROW (alias_sets, last_alias_set + 2);
        return ++last_alias_set;
      }
    else
--- 598,607 ----
  
    if (flag_strict_aliasing)
      {
!       if (!alias_sets)
! 	VARRAY_GENERIC_PTR_INIT (alias_sets, 10, "alias sets");
!       else
! 	VARRAY_GROW (alias_sets, last_alias_set + 2);
        return ++last_alias_set;
      }
    else
*************** init_alias_once (void)
*** 2672,2679 ****
    static_reg_base_value[HARD_FRAME_POINTER_REGNUM]
      = gen_rtx_ADDRESS (Pmode, hard_frame_pointer_rtx);
  #endif
- 
-   VARRAY_GENERIC_PTR_INIT (alias_sets, 10, "alias sets");
  }
  
  /* Set MEMORY_MODIFIED when X modifies DATA (that is assumed
--- 2675,2680 ----


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