From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19450 invoked by alias); 7 Jun 2011 14:05:27 -0000 Received: (qmail 19442 invoked by uid 22791); 7 Jun 2011 14:05:26 -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,RFC_ABUSE_POST 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; Tue, 07 Jun 2011 14:05:08 +0000 Received: by wye20 with SMTP id 20so4244483wye.20 for ; Tue, 07 Jun 2011 07:05:07 -0700 (PDT) MIME-Version: 1.0 Received: by 10.227.152.132 with SMTP id g4mr6204579wbw.24.1307455507059; Tue, 07 Jun 2011 07:05:07 -0700 (PDT) Received: by 10.227.37.152 with HTTP; Tue, 7 Jun 2011 07:05:06 -0700 (PDT) In-Reply-To: <4DEE2DCF.7020905@redhat.com> References: <4DEDB98F.6010508@redhat.com> <4DEE2DCF.7020905@redhat.com> Date: Tue, 07 Jun 2011 14:05:00 -0000 Message-ID: Subject: Re: RFA (fold): PATCH for c++/49290 (folding *(T*)(ar+10)) From: Richard Guenther To: Jason Merrill Cc: Richard Guenther , gcc-patches List 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-06/txt/msg00521.txt.bz2 On Tue, Jun 7, 2011 at 3:55 PM, Jason Merrill wrote: > On 06/07/2011 06:19 AM, Richard Guenther wrote: >> >> I _think_ that you can unconditionally change the code to do >> >> =A0 TYPE_MAIN_VARIANT (t1) =3D=3D TYPE_MAIN_VARIANT (t2) >> =A0 && =A0TYPE_QUALS (t1) =3D=3D TYPE_QUALS (t2) >> >> now, I'm not sure if for the testcase T and unsigned differ in qualifier= s. >> Do they? > > Hmm, I think with the changes I made to the testcase they end up with the > same qualifiers. =A0But for constexpr I need to handle them having differ= ent > qualifiers, too. In that case you could do what Jakub suggested - but only for rvalues of course. I'm not sure if we already avoid calling the folding where we require lvalues. Can't you instead adjust the type you feed to fold_indirect_ref_1 in the caller in the C++ FE? Richard. > Jason >