From patchwork Thu Apr 21 03:02:59 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jason Merrill X-Patchwork-Id: 92366 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) by ozlabs.org (Postfix) with SMTP id EFD98B6F74 for ; Thu, 21 Apr 2011 13:03:26 +1000 (EST) Received: (qmail 13660 invoked by alias); 21 Apr 2011 03:03:23 -0000 Received: (qmail 13651 invoked by uid 22791); 21 Apr 2011 03:03:23 -0000 X-SWARE-Spam-Status: No, hits=-6.3 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, 21 Apr 2011 03:03:00 +0000 Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p3L330wv032195 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Wed, 20 Apr 2011 23:03:00 -0400 Received: from [127.0.0.1] (ovpn-113-102.phx2.redhat.com [10.3.113.102]) by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id p3L32xc4000344 for ; Wed, 20 Apr 2011 23:02:59 -0400 Message-ID: <4DAF9E63.6050701@redhat.com> Date: Wed, 20 Apr 2011 20:02:59 -0700 From: Jason Merrill User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.15) Gecko/20110307 Fedora/3.1.9-0.39.b3pre.fc14 Lightning/1.0b2 Thunderbird/3.1.9 MIME-Version: 1.0 To: gcc-patches List Subject: Re: C++ PATCH for c++/48594 (failure with overloaded ->* in template) References: <4DA60C1F.4000101@redhat.com> In-Reply-To: <4DA60C1F.4000101@redhat.com> Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org While backporting this to 4.5 and 4.4 I noticed that making the object non-dependent shouldn't be conditionalized. Tested x86_64-pc-linux-gnu, applying to 4.6 and trunk. Applying the two patches folded together on 4.4 and 4.5. commit a39f5c2859bb16af16945830f3c0802c40441b70 Author: Jason Merrill Date: Wed Apr 20 12:48:33 2011 -0700 PR c++/48594 * decl2.c (build_offset_ref_call_from_tree): Move non-dependency of object outside condition. diff --git a/gcc/cp/decl2.c b/gcc/cp/decl2.c index 1217e42..89e03c0 100644 --- a/gcc/cp/decl2.c +++ b/gcc/cp/decl2.c @@ -4079,9 +4079,9 @@ build_offset_ref_call_from_tree (tree fn, VEC(tree,gc) **args) parameter. That must be done before the FN is transformed because we depend on the form of FN. */ make_args_non_dependent (*args); + object = build_non_dependent_expr (object); if (TREE_CODE (TREE_TYPE (fn)) == METHOD_TYPE) { - object = build_non_dependent_expr (object); if (TREE_CODE (fn) == DOTSTAR_EXPR) object = cp_build_addr_expr (object, tf_warning_or_error); VEC_safe_insert (tree, gc, *args, 0, object);