This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: GCC build failed for native with your patch on 2004-01-12T17:28:05Z.
- From: Jan Hubicka <jh at suse dot cz>
- To: Andrew Pinski <pinskia at physics dot uc dot edu>, gcc-patches at gcc dot gnu dot org
- Cc: gcc-regression at gcc dot gnu dot org, Jan Hubicka <jh at suse dot cz>
- Date: Mon, 12 Jan 2004 20:13:36 +0100
- Subject: Re: GCC build failed for native with your patch on 2004-01-12T17:28:05Z.
- References: <200401121747.i0CHlSWK003770@gcc-regress.apple.com> <59B9AE66-452C-11D8-922D-000393A6D2F2@physics.uc.edu>
> 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 ----