From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5745 invoked by alias); 7 Jun 2011 14:24:27 -0000 Received: (qmail 5735 invoked by uid 22791); 7 Jun 2011 14:24:25 -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; Tue, 07 Jun 2011 14:24:06 +0000 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p57EO56F028421 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Tue, 7 Jun 2011 10:24:05 -0400 Received: from [127.0.0.1] (ovpn-113-53.phx2.redhat.com [10.3.113.53]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id p57EO4iC019036; Tue, 7 Jun 2011 10:24:05 -0400 Message-ID: <4DEE3484.8030101@redhat.com> Date: Tue, 07 Jun 2011 14:24: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 Subject: Re: RFA (fold): PATCH for c++/49290 (folding *(T*)(ar+10)) References: <4DEDB98F.6010508@redhat.com> <4DEE2DCF.7020905@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/msg00524.txt.bz2 On 06/07/2011 10:05 AM, Richard Guenther wrote: > In that case you could do what Jakub suggested - but only for rvalues > of course. Right, and I need to handle lvalues as well. > I'm not sure if we already avoid calling the folding where we > require lvalues. No, we don't. > Can't you instead adjust the type you feed to fold_indirect_ref_1 in > the caller in the C++ FE? Not without digging down into the operand to see what type it wants. At that point I might as well just copy the whole function into the FE. Jason