From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31731 invoked by alias); 28 Oct 2010 12:45:51 -0000 Received: (qmail 31723 invoked by uid 22791); 28 Oct 2010 12:45:51 -0000 X-SWARE-Spam-Status: No, hits=-6.1 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; Thu, 28 Oct 2010 12:45:43 +0000 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o9SCjfMV011264 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 28 Oct 2010 08:45:41 -0400 Received: from [127.0.0.1] (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id o9SCjetG007139; Thu, 28 Oct 2010 08:45:41 -0400 Message-ID: <4CC97076.5040506@redhat.com> Date: Thu, 28 Oct 2010 16:18:00 -0000 From: Jason Merrill User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.14) Gecko/20101020 Lightning/1.0b1 Shredder/3.0.10pre MIME-Version: 1.0 To: Richard Guenther CC: gcc-patches List Subject: Re: RFA: PATCH to make fold_indirect_ref_1 fold more things References: <4CC7579A.6020408@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: 2010-10/txt/msg02413.txt.bz2 On 10/27/2010 02:29 PM, Richard Guenther wrote: > On Tue, Oct 26, 2010 at 6:35 PM, Jason Merrill wrote: >> For constexpr I need to be able to fold some tree forms that >> fold_indirect_ref_1 didn't handle; this patch extends it to handle folding >> POINTER_PLUS_EXPR to an ARRAY_REF, and also folding to COMPONENT_REF. > > I think by making this kind of transforms you are prone to bugs like PR44468. Ah, interesting. But it seems to me that this case is different because we are starting from an ADDR_EXPR around an expression of the aggregate type in the folded expression, not just any pointer to the aggregate type. What do you think? Jason