From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1067 invoked by alias); 12 Jun 2011 22:11:11 -0000 Received: (qmail 1047 invoked by uid 22791); 12 Jun 2011 22:11:10 -0000 X-SWARE-Spam-Status: No, hits=-6.4 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI,SPF_HELO_PASS,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sun, 12 Jun 2011 22:10:53 +0000 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p5CMAqU1010888 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Sun, 12 Jun 2011 18:10:52 -0400 Received: from [127.0.0.1] (ovpn-113-40.phx2.redhat.com [10.3.113.40]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id p5CMApw1012262; Sun, 12 Jun 2011 18:10:51 -0400 Message-ID: <4DF5396B.6070502@redhat.com> Date: Sun, 12 Jun 2011 22:42:00 -0000 From: Jason Merrill User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.17) Gecko/20110428 Fedora/3.1.10-1.fc14 Lightning/1.0b2 Thunderbird/3.1.10 MIME-Version: 1.0 To: Richard Guenther CC: Richard Guenther , gcc-patches List , GCC Subject: Re: Is VIEW_CONVERT_EXPR an lvalue? (was Re: RFA (fold): PATCH for c++/49290 (folding *(T*)(ar+10))) References: <4DEDB98F.6010508@redhat.com> <4DEE2DCF.7020905@redhat.com> <4DEE3484.8030101@redhat.com> <4DF11FBC.3010304@redhat.com> <4DF223D4.3080700@redhat.com> <4DF22656.9050700@redhat.com> <4DF3C98B.6070006@redhat.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit 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-06/txt/msg00956.txt.bz2 On 06/12/2011 06:59 AM, Richard Guenther wrote: > The please provide a specification on what a VIEW_CONVERT_EXPR does > to type-based alias analysis. If the alias set of the VIEW_CONVERT_EXPR type the same as the set for the operand, ignore it; if it's a subset, handle it like a COMPONENT_REF; otherwise ignore the operand for TBAA. It seems like get_alias_set currently gets this backwards; it's ignoring outer COMPONENT_REFs instead of the inner structure. > Yes, we do handle lvalue VIEW_CONVERT_EXPRs, but that is for Ada > which uses it for aggregates. It also seems to be widely used for vectors, but perhaps that's only for rvalues. > I don't want us to add more lvalue > VIEW_CONVERT_EXPR cases, especially not for register types. Then how do we convert an int lvalue to a volatile int lvalue? > /* Represents viewing something of one type as being of a second type. > This corresponds to an "Unchecked Conversion" in Ada and roughly to > the idiom *(type2 *)&X in C. Right, that's why I thought it was an lvalue. > This code may also be used within the LHS of a MODIFY_EXPR And this. Jason