From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19792 invoked by alias); 18 Oct 2004 19:48:18 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 19784 invoked from network); 18 Oct 2004 19:48:17 -0000 Received: from unknown (HELO mx1.redhat.com) (66.187.233.31) by sourceware.org with SMTP; 18 Oct 2004 19:48:17 -0000 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.11/8.12.10) with ESMTP id i9IJmHpM025505; Mon, 18 Oct 2004 15:48:17 -0400 Received: from [172.16.83.144] (vpn83-144.boston.redhat.com [172.16.83.144]) by int-mx1.corp.redhat.com (8.11.6/8.11.6) with ESMTP id i9IJmGr18475; Mon, 18 Oct 2004 15:48:16 -0400 Subject: Re: [PATCH] fix PR middle-end/17885, gimplifing of volatile &a->b From: Jeffrey A Law Reply-To: law@redhat.com To: Andrew Pinski Cc: "gcc-patches@gcc.gnu.org Patches" In-Reply-To: <75B2AC4A-2111-11D9-B4B8-000A95D692F4@physics.uc.edu> References: <75B2AC4A-2111-11D9-B4B8-000A95D692F4@physics.uc.edu> Content-Type: text/plain Organization: Red Hat, Inc Message-Id: <1098128894.2915.43.camel@localhost.localdomain> Mime-Version: 1.0 Date: Mon, 18 Oct 2004 19:49:00 -0000 Content-Transfer-Encoding: 7bit X-SW-Source: 2004-10/txt/msg01533.txt.bz2 On Mon, 2004-10-18 at 08:24, Andrew Pinski wrote: > The problem here is that we don't handle taking the address of > volatile pointers to structs' members, aka we don't handle > when we have volatile types but the expression it self is not > volatile. This fixes the problem by handling them. > > OK? Bootstrapped and tested on powerpc-darwin with no regressions. > > Thanks, > Andrew Pinski > > ChangeLog: > * gimplify.c (gimplify_expr): Handle ADDR_EXPR when > we have volatile types but the expression it self is > not volatile. So can you explain a little more about how this patch actually fixes the problem? How does adding a second call to gimplify_addr_expr change anything? All you've done is avoid the default case which aborts -- you haven't (as far as I can tell) changed the gimple code we produce all. It seems to me you really wanted to call gimplify_expr to remove the embedded volatile reference. jeff