This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: PATCH [5/n]: Prepare x32: PR middle-end/48016: Inconsistency in non-local goto save area
Hi,
On Wed, 29 Jun 2011, H.J. Lu wrote:
> > diff --git a/gcc/function.c b/gcc/function.c
> > index 81c4d39..131bc09 100644
> > --- a/gcc/function.c
> > +++ b/gcc/function.c
> > @@ -4780,7 +4780,7 @@ expand_function_start (tree subr)
> > Â Â Â Â Â Â Â Â Â Â Â cfun->nonlocal_goto_save_area,
> > Â Â Â Â Â Â Â Â Â Â Â integer_zero_node, NULL_TREE, NULL_TREE);
> > Â Â Â r_save = expand_expr (t_save, NULL_RTX, VOIDmode, EXPAND_WRITE);
> > - Â Â Âr_save = convert_memory_address (Pmode, r_save);
> > + Â Â Âr_save = adjust_address (r_save, Pmode, 0);
This is actually the same problem as in explow.c. t_save is built with
ptr_type_node, where it should have been using
TREE_TYPE (TREE_TYPE (cfun->nonlocal_goto_save_area))
Then r_save should have the correct mode already, possibly this could be
asserted. You are right that r_save needs to correspond to the
nonlocal_goto_save_area[0] array-ref, hence pseudos aren't okay, therefore
convert_memory_address isn't. Actually I think we might even want to
assert that indeed the expanded r_save is of Pmode already.
Ciao,
Michael.