From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26194 invoked by alias); 1 Jul 2011 08:01:48 -0000 Received: (qmail 26184 invoked by uid 22791); 1 Jul 2011 08:01:47 -0000 X-SWARE-Spam-Status: No, hits=-2.4 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW X-Spam-Check-By: sourceware.org Received: from mail-wy0-f175.google.com (HELO mail-wy0-f175.google.com) (74.125.82.175) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 01 Jul 2011 08:01:22 +0000 Received: by wyg30 with SMTP id 30so2462347wyg.20 for ; Fri, 01 Jul 2011 01:01:20 -0700 (PDT) MIME-Version: 1.0 Received: by 10.227.172.203 with SMTP id m11mr1214801wbz.65.1309507280534; Fri, 01 Jul 2011 01:01:20 -0700 (PDT) Received: by 10.227.36.212 with HTTP; Fri, 1 Jul 2011 01:01:20 -0700 (PDT) In-Reply-To: References: <20110611160548.GA20036@intel.com> Date: Fri, 01 Jul 2011 08:01:00 -0000 Message-ID: Subject: Re: PATCH [5/n]: Prepare x32: PR middle-end/48016: Inconsistency in non-local goto save area From: Richard Guenther To: "H.J. Lu" Cc: Michael Matz , gcc-patches@gcc.gnu.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org X-SW-Source: 2011-07/txt/msg00012.txt.bz2 On Thu, Jun 30, 2011 at 8:05 PM, H.J. Lu wrote: > On Wed, Jun 29, 2011 at 9:16 AM, Michael Matz 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) >>> > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 cfun->nonlocal_goto_save_= area, >>> > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 integer_zero_node, NULL_T= REE, NULL_TREE); >>> > =A0 =A0 =A0 r_save =3D expand_expr (t_save, NULL_RTX, VOIDmode, EXPAN= D_WRITE); >>> > - =A0 =A0 =A0r_save =3D convert_memory_address (Pmode, r_save); >>> > + =A0 =A0 =A0r_save =3D adjust_address (r_save, Pmode, 0); >> >> This is actually the same problem as in explow.c. =A0t_save is built with >> ptr_type_node, where it should have been using >> =A0TREE_TYPE (TREE_TYPE (cfun->nonlocal_goto_save_area)) >> >> Then r_save should have the correct mode already, possibly this could be >> asserted. =A0You are right that r_save needs to correspond to the >> nonlocal_goto_save_area[0] array-ref, hence pseudos aren't okay, therefo= re >> convert_memory_address isn't. =A0Actually I think we might even want to >> assert that indeed the expanded r_save is of Pmode already. >> >> > > This patch works for me. =A0OK for trunk if there are no regressions? Ok. Thanks, Richard. > Thanks. > > > -- > H.J. > --- > 2011-06-30 =A0H.J. Lu =A0 > > =A0 =A0 =A0 =A0PR middle-end/48016 > =A0 =A0 =A0 =A0* explow.c (update_nonlocal_goto_save_area): Use proper mo= de > =A0 =A0 =A0 =A0for stack save area. > =A0 =A0 =A0 =A0* function.c (expand_function_start): Likewise. >