From: Richard Guenther <richard.guenther@gmail.com>
To: "H.J. Lu" <hjl.tools@gmail.com>
Cc: Michael Matz <matz@suse.de>, gcc-patches@gcc.gnu.org
Subject: Re: PATCH [5/n]: Prepare x32: PR middle-end/48016: Inconsistency in non-local goto save area
Date: Fri, 01 Jul 2011 08:01:00 -0000 [thread overview]
Message-ID: <BANLkTikjr-0wFAiCpnVAzNWyH38ez+mMtA@mail.gmail.com> (raw)
In-Reply-To: <BANLkTikR74CQL_j=sDLn1FZz+N6PNFqgdw@mail.gmail.com>
On Thu, Jun 30, 2011 at 8:05 PM, H.J. Lu <hjl.tools@gmail.com> wrote:
> On Wed, Jun 29, 2011 at 9:16 AM, Michael Matz <matz@suse.de> wrote:
>> 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.
>>
>>
>
> This patch works for me. OK for trunk if there are no regressions?
Ok.
Thanks,
Richard.
> Thanks.
>
>
> --
> H.J.
> ---
> 2011-06-30 H.J. Lu <hongjiu.lu@intel.com>
>
> PR middle-end/48016
> * explow.c (update_nonlocal_goto_save_area): Use proper mode
> for stack save area.
> * function.c (expand_function_start): Likewise.
>
prev parent reply other threads:[~2011-07-01 8:01 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-06-11 16:22 H.J. Lu
2011-06-15 14:37 ` Michael Matz
2011-06-15 15:10 ` H.J. Lu
[not found] ` <Pine.LNX.4.64.1106151659200.17115@wotan.suse.de>
2011-06-16 6:41 ` H.J. Lu
2011-06-16 8:02 ` Richard Guenther
2011-06-16 17:59 ` H.J. Lu
2011-06-25 16:20 ` H.J. Lu
2011-06-29 15:25 ` H.J. Lu
2011-06-29 17:03 ` Michael Matz
2011-06-30 18:10 ` H.J. Lu
2011-07-01 8:01 ` Richard Guenther [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=BANLkTikjr-0wFAiCpnVAzNWyH38ez+mMtA@mail.gmail.com \
--to=richard.guenther@gmail.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=hjl.tools@gmail.com \
--cc=matz@suse.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).