From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-il1-x136.google.com (mail-il1-x136.google.com [IPv6:2607:f8b0:4864:20::136]) by sourceware.org (Postfix) with ESMTPS id F257E385841A for ; Fri, 20 Oct 2023 15:57:58 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org F257E385841A Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org F257E385841A Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::136 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1697817481; cv=none; b=jcxqW/+HcoVwFNcy1wBkReqCdszknJfkLXASgsLTrPYEqPP0moL/y3+908fREc3B8s5/j6Rvkh8OMt7mYH10mfp4p6q8K9YZjbEpobv2XYwsP6RLPFa8Z3+xogG2LUGJjDalAgXiWDKQHXn8RX7/a1BaZCPiFrPnz8TD8DHiSS4= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1697817481; c=relaxed/simple; bh=grUyk3NBn1XuIHdsVv4D0V4ROuONBNXjAVdx4la5tKE=; h=DKIM-Signature:MIME-Version:From:Date:Message-ID:Subject:To; b=cizf355+a+Gquq1IVptO+yY94FX906QAx35CkPP8WnnIEO7pM6wdBSb9P3N8gJk/g5EShr1VdDHXhe6UxYecrGbYLVMCCzuucQFdb1ZGzu6EQyPJEj35/aQPHlo0EuPoVpPNcRstBu9gn0y18YounTvHLZMnx8YniqiPNSiengU= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-il1-x136.google.com with SMTP id e9e14a558f8ab-3577ce73552so3518095ab.2 for ; Fri, 20 Oct 2023 08:57:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1697817478; x=1698422278; darn=gcc.gnu.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=zvYKoujRQ+4S9+0+LBAUuQWNdaKXlbJfy9sqj/p9kOs=; b=iWb/R06GMzQw0SgkqN7IpZCkWr3saIp7dDWpvY/DcFswkSWgy+UGupZl1AJb6Y438h WyUSDTmbzkjK/uwUbz/nZOSH7pr/M63G28UcMGnZI5DCTwDrvg1krct1OHLov3CYJ+FK ajnDqaTBDlzBElTxb0LbVqMBSNXjM4LoxoMSiexgcSNZzxbt/jl+nO8WqgntPg5mOQJn 6U8BV/xGxB4XEdYTKWrQX5EDBxESVCSwtAVWvdQze1SUTcYM8c5SPBujRXm2dFvmUk1g 57m07mPwxldJeLQ0RPz4ykCGWhW3U5fuBWQiKAvI2+y1JchNp8AmX9DKcHEDqzhBblLh S73g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697817478; x=1698422278; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=zvYKoujRQ+4S9+0+LBAUuQWNdaKXlbJfy9sqj/p9kOs=; b=K75k3Mh8Wf3pLPpe6K5S/rK+UPbdhvqwzrbjjetj7ewTGGbEiZ+SIDKhZI9L2XAdqY J15NWximmvsM7oJY4AqaZdka7ptmR72/pjs/lU/GwLGHlSaoS4n+XJCH7y2j7dpXbQft zpW4mpcUk1XHXcu/dYWjngl+HV3TLz0808x6NbiF3HEUw0xyzQcWpmgoBNc0odDWZQcv o8+ilMzd0ZrmDmLOWXqibnW4QesHSSrP1r+49NTwITm1oQIWah87+3IiC/2luvBVil7U +9FY8IhDDUWqjOChuNJER8P50SBUyah6Lb9YXn4WK4GFhNeAENKvNurDFnr1P3NOp0Pm abiA== X-Gm-Message-State: AOJu0Yz89mJERQYf6V/rC8QwB6Cgb4y7OLIw4KoDMGyLp9eBI/G77mOz rb0o5d1iKLAqHjqDG+dQtH6PZbCb0FZu60kJl4s= X-Google-Smtp-Source: AGHT+IGkTqerhAfFVBe79PFJIR04gS2sLVwE8XCGgtEzG/Vpq72miVhmLAs9MUn0k7HoElvSk/UVrH2CiXhvNrjWpJQ= X-Received: by 2002:a92:d9ce:0:b0:351:5b43:5ecd with SMTP id n14-20020a92d9ce000000b003515b435ecdmr2153576ilq.14.1697817477750; Fri, 20 Oct 2023 08:57:57 -0700 (PDT) MIME-Version: 1.0 References: <20230925204302.1277285-1-ppalka@redhat.com> <20230925204302.1277285-2-ppalka@redhat.com> In-Reply-To: <20230925204302.1277285-2-ppalka@redhat.com> From: Andrew Pinski Date: Fri, 20 Oct 2023 08:57:45 -0700 Message-ID: Subject: Re: [PATCH 2/2] c++: remove NON_DEPENDENT_EXPR, part 2 To: Patrick Palka Cc: gcc-patches@gcc.gnu.org, jason@redhat.com Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-7.6 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,GIT_PATCH_0,KAM_ASCII_DIVIDERS,KAM_NUMSUBJECT,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On Mon, Sep 25, 2023 at 1:43=E2=80=AFPM Patrick Palka w= rote: > > This much more mechanical patch removes build_non_dependent_expr > (and make_args_non_dependent) and adjusts callers accordingly, > no functional change. This broke the RUST front-end which decided to copy/reuse the C++ code for constexpr and not modify it not to include trees it does not use. In this case NON_DEPENDENT_EXPR was removed and now the rust front-end is broken. Thanks, Andrew > > gcc/cp/ChangeLog: > > * call.cc (build_new_method_call): Remove calls to > build_non_dependent_expr and/or make_args_non_dependent. > * coroutines.cc (finish_co_return_stmt): Likewise. > * cp-tree.h (build_non_dependent_expr): Remove. > (make_args_non_dependent): Remove. > * decl2.cc (grok_array_decl): Remove calls to > build_non_dependent_expr and/or make_args_non_dependent. > (build_offset_ref_call_from_tree): Likewise. > * init.cc (build_new): Likewise. > * pt.cc (make_args_non_dependent): Remove. > (test_build_non_dependent_expr): Remove. > (cp_pt_cc_tests): Adjust. > * semantics.cc (finish_expr_stmt): Remove calls to > build_non_dependent_expr and/or make_args_non_dependent. > (finish_for_expr): Likewise. > (finish_call_expr): Likewise. > (finish_omp_atomic): Likewise. > * typeck.cc (finish_class_member_access_expr): Likewise. > (build_x_indirect_ref): Likewise. > (build_x_binary_op): Likewise. > (build_x_array_ref): Likewise. > (build_x_vec_perm_expr): Likewise. > (build_x_shufflevector): Likewise. > (build_x_unary_op): Likewise. > (cp_build_addressof): Likewise. > (build_x_conditional_expr): > (build_x_compound_expr): Likewise. > (build_static_cast): Likewise. > (build_x_modify_expr): Likewise. > (check_return_expr): Likewise. > * typeck2.cc (build_x_arrow): Likewise. > --- > gcc/cp/call.cc | 7 +------ > gcc/cp/coroutines.cc | 3 --- > gcc/cp/cp-tree.h | 2 -- > gcc/cp/decl2.cc | 17 +++------------- > gcc/cp/init.cc | 5 ----- > gcc/cp/pt.cc | 46 -------------------------------------------- > gcc/cp/semantics.cc | 25 ++---------------------- > gcc/cp/typeck.cc | 31 ----------------------------- > gcc/cp/typeck2.cc | 1 - > 9 files changed, 6 insertions(+), 131 deletions(-) > > diff --git a/gcc/cp/call.cc b/gcc/cp/call.cc > index e8dafbd8ba6..15079ddf6dc 100644 > --- a/gcc/cp/call.cc > +++ b/gcc/cp/call.cc > @@ -11430,12 +11430,7 @@ build_new_method_call (tree instance, tree fns, = vec **args, > } > > if (processing_template_decl) > - { > - orig_args =3D args =3D=3D NULL ? NULL : make_tree_vector_copy (*ar= gs); > - instance =3D build_non_dependent_expr (instance); > - if (args !=3D NULL) > - make_args_non_dependent (*args); > - } > + orig_args =3D args =3D=3D NULL ? NULL : make_tree_vector_copy (*args= ); > > /* Process the argument list. */ > if (args !=3D NULL && *args !=3D NULL) > diff --git a/gcc/cp/coroutines.cc b/gcc/cp/coroutines.cc > index df3cc820797..a5464becf7f 100644 > --- a/gcc/cp/coroutines.cc > +++ b/gcc/cp/coroutines.cc > @@ -1351,9 +1351,6 @@ finish_co_return_stmt (location_t kw, tree expr) > to undo it so we can try to treat it as an rvalue below. */ > expr =3D maybe_undo_parenthesized_ref (expr); > > - if (processing_template_decl) > - expr =3D build_non_dependent_expr (expr); > - > if (error_operand_p (expr)) > return error_mark_node; > } > diff --git a/gcc/cp/cp-tree.h b/gcc/cp/cp-tree.h > index 66b9a9c4b9a..8b9a7d58462 100644 > --- a/gcc/cp/cp-tree.h > +++ b/gcc/cp/cp-tree.h > @@ -7488,8 +7488,6 @@ extern bool any_value_dependent_elements_p (co= nst_tree); > extern bool dependent_omp_for_p (tree, tree, tree= , tree); > extern tree resolve_typename_type (tree, bool); > extern tree template_for_substitution (tree); > -inline tree build_non_dependent_expr (tree t) { return t; } //= XXX remove > -extern void make_args_non_dependent (vec *); > extern bool reregister_specialization (tree, tree, tree); > extern tree instantiate_non_dependent_expr (tree, tsubst_flags_t =3D= tf_error); > extern tree instantiate_non_dependent_expr_internal (tree, tsubst_flags_= t); > diff --git a/gcc/cp/decl2.cc b/gcc/cp/decl2.cc > index 344e19ec98b..0aa1e355972 100644 > --- a/gcc/cp/decl2.cc > +++ b/gcc/cp/decl2.cc > @@ -427,14 +427,8 @@ grok_array_decl (location_t loc, tree array_expr, tr= ee index_exp, > return build_min_nt_loc (loc, ARRAY_REF, array_expr, index_exp, > NULL_TREE, NULL_TREE); > } > - array_expr =3D build_non_dependent_expr (array_expr); > - if (index_exp) > - index_exp =3D build_non_dependent_expr (index_exp); > - else > - { > - orig_index_exp_list =3D make_tree_vector_copy (*index_exp_list)= ; > - make_args_non_dependent (*index_exp_list); > - } > + if (!index_exp) > + orig_index_exp_list =3D make_tree_vector_copy (*index_exp_list); > } > > type =3D TREE_TYPE (array_expr); > @@ -5435,18 +5429,13 @@ build_offset_ref_call_from_tree (tree fn, vec **args, > orig_args =3D make_tree_vector_copy (*args); > > /* Transform the arguments and add the implicit "this" > - parameter. That must be done before the FN is transformed > - because we depend on the form of FN. */ > - make_args_non_dependent (*args); > - object =3D build_non_dependent_expr (object); > + parameter. */ > if (TREE_CODE (TREE_TYPE (fn)) =3D=3D METHOD_TYPE) > { > if (TREE_CODE (fn) =3D=3D DOTSTAR_EXPR) > object =3D cp_build_addr_expr (object, complain); > vec_safe_insert (*args, 0, object); > } > - /* Now that the arguments are done, transform FN. */ > - fn =3D build_non_dependent_expr (fn); > } > > /* A qualified name corresponding to a bound pointer-to-member is > diff --git a/gcc/cp/init.cc b/gcc/cp/init.cc > index c5830297b93..d1bae3b155f 100644 > --- a/gcc/cp/init.cc > +++ b/gcc/cp/init.cc > @@ -3920,11 +3920,6 @@ build_new (location_t loc, vec **plac= ement, tree type, > (**init)[i] =3D copy_node (e); > } > } > - > - make_args_non_dependent (*placement); > - if (nelts) > - nelts =3D build_non_dependent_expr (nelts); > - make_args_non_dependent (*init); > } > > if (nelts) > diff --git a/gcc/cp/pt.cc b/gcc/cp/pt.cc > index e565c0538b7..382db4dd01d 100644 > --- a/gcc/cp/pt.cc > +++ b/gcc/cp/pt.cc > @@ -29294,24 +29294,6 @@ resolve_typename_type (tree type, bool only_curr= ent_p) > return result; > } > > -/* ARGS is a vector of expressions as arguments to a function call. > - Replace the arguments with equivalent non-dependent expressions. > - This modifies ARGS in place. */ > - > -void > -make_args_non_dependent (vec *args) > -{ > - unsigned int ix; > - tree arg; > - > - FOR_EACH_VEC_SAFE_ELT (args, ix, arg) > - { > - tree newarg =3D build_non_dependent_expr (arg); > - if (newarg !=3D arg) > - (*args)[ix] =3D newarg; > - } > -} > - > /* Returns a type which represents 'auto' or 'decltype(auto)'. We use a > TEMPLATE_TYPE_PARM with a level one deeper than the actual template p= arms, > by default. If set_canonical is true, we set TYPE_CANONICAL on it. = */ > @@ -31523,33 +31505,6 @@ print_template_statistics (void) > > namespace selftest { > > -/* Verify that build_non_dependent_expr () works, for various expression= s, > - and that location wrappers don't affect the results. */ > - > -static void > -test_build_non_dependent_expr () > -{ > - location_t loc =3D BUILTINS_LOCATION; > - > - /* Verify constants, without and with location wrappers. */ > - tree int_cst =3D build_int_cst (integer_type_node, 42); > - ASSERT_EQ (int_cst, build_non_dependent_expr (int_cst)); > - > - tree wrapped_int_cst =3D maybe_wrap_with_location (int_cst, loc); > - ASSERT_TRUE (location_wrapper_p (wrapped_int_cst)); > - ASSERT_EQ (wrapped_int_cst, build_non_dependent_expr (wrapped_int_cst)= ); > - > - tree string_lit =3D build_string (4, "foo"); > - TREE_TYPE (string_lit) =3D char_array_type_node; > - string_lit =3D fix_string_type (string_lit); > - ASSERT_EQ (string_lit, build_non_dependent_expr (string_lit)); > - > - tree wrapped_string_lit =3D maybe_wrap_with_location (string_lit, loc)= ; > - ASSERT_TRUE (location_wrapper_p (wrapped_string_lit)); > - ASSERT_EQ (wrapped_string_lit, > - build_non_dependent_expr (wrapped_string_lit)); > -} > - > /* Verify that type_dependent_expression_p () works correctly, even > in the presence of location wrapper nodes. */ > > @@ -31590,7 +31545,6 @@ test_type_dependent_expression_p () > void > cp_pt_cc_tests () > { > - test_build_non_dependent_expr (); > test_type_dependent_expression_p (); > } > > diff --git a/gcc/cp/semantics.cc b/gcc/cp/semantics.cc > index 80ef1364e33..1d478f0781f 100644 > --- a/gcc/cp/semantics.cc > +++ b/gcc/cp/semantics.cc > @@ -916,8 +916,7 @@ finish_expr_stmt (tree expr) > expr =3D convert_to_void (expr, ICV_STATEMENT, tf_warning_or_er= ror); > } > else if (!type_dependent_expression_p (expr)) > - convert_to_void (build_non_dependent_expr (expr), ICV_STATEMENT, > - tf_warning_or_error); > + convert_to_void (expr, ICV_STATEMENT, tf_warning_or_error); > > if (check_for_bare_parameter_packs (expr)) > expr =3D error_mark_node; > @@ -1396,8 +1395,7 @@ finish_for_expr (tree expr, tree for_stmt) > tf_warning_or_error); > } > else if (!type_dependent_expression_p (expr)) > - convert_to_void (build_non_dependent_expr (expr), ICV_THIRD_IN_FOR, > - tf_warning_or_error); > + convert_to_void (expr, ICV_THIRD_IN_FOR, tf_warning_or_error); > expr =3D maybe_cleanup_point_expr_void (expr); > if (check_for_bare_parameter_packs (expr)) > expr =3D error_mark_node; > @@ -2819,11 +2817,6 @@ finish_call_expr (tree fn, vec **args= , bool disallow_virtual, > return result; > } > orig_args =3D make_tree_vector_copy (*args); > - if (!BASELINK_P (fn) > - && TREE_CODE (fn) !=3D PSEUDO_DTOR_EXPR > - && TREE_TYPE (fn) !=3D unknown_type_node) > - fn =3D build_non_dependent_expr (fn); > - make_args_non_dependent (*args); > } > > if (TREE_CODE (fn) =3D=3D COMPONENT_REF) > @@ -11034,20 +11027,6 @@ finish_omp_atomic (location_t loc, enum tree_cod= e code, enum tree_code opcode, > || TREE_CODE (OMP_CLAUSE_HINT_EXPR (clauses)) !=3D INTEGER_= CST) > dependent_p =3D true; > } > - if (!dependent_p) > - { > - lhs =3D build_non_dependent_expr (lhs); > - if (rhs) > - rhs =3D build_non_dependent_expr (rhs); > - if (v) > - v =3D build_non_dependent_expr (v); > - if (lhs1) > - lhs1 =3D build_non_dependent_expr (lhs1); > - if (rhs1) > - rhs1 =3D build_non_dependent_expr (rhs1); > - if (r && r !=3D void_list_node) > - r =3D build_non_dependent_expr (r); > - } > } > if (!dependent_p) > { > diff --git a/gcc/cp/typeck.cc b/gcc/cp/typeck.cc > index 2cfa3c8a935..f3dc80c40cf 100644 > --- a/gcc/cp/typeck.cc > +++ b/gcc/cp/typeck.cc > @@ -3385,7 +3385,6 @@ finish_class_member_access_expr (cp_expr object, tr= ee name, bool template_p, > return build_min_nt_loc (UNKNOWN_LOCATION, COMPONENT_REF, > orig_object, orig_name, NULL_TREE); > } > - object =3D build_non_dependent_expr (object); > } > else if (c_dialect_objc () > && identifier_p (name) > @@ -3743,7 +3742,6 @@ build_x_indirect_ref (location_t loc, tree expr, re= f_operator errorstring, > =3D build_dependent_operator_type (lookups, INDIRECT_REF, fal= se); > return expr; > } > - expr =3D build_non_dependent_expr (expr); > } > > rval =3D build_new_op (loc, INDIRECT_REF, LOOKUP_NORMAL, expr, > @@ -4712,8 +4710,6 @@ build_x_binary_op (const op_location_t &loc, enum t= ree_code code, tree arg1, > =3D build_dependent_operator_type (lookups, code, false); > return expr; > } > - arg1 =3D build_non_dependent_expr (arg1); > - arg2 =3D build_non_dependent_expr (arg2); > } > > if (code =3D=3D DOTSTAR_EXPR) > @@ -4767,8 +4763,6 @@ build_x_array_ref (location_t loc, tree arg1, tree = arg2, > || type_dependent_expression_p (arg2)) > return build_min_nt_loc (loc, ARRAY_REF, arg1, arg2, > NULL_TREE, NULL_TREE); > - arg1 =3D build_non_dependent_expr (arg1); > - arg2 =3D build_non_dependent_expr (arg2); > } > > expr =3D build_new_op (loc, ARRAY_REF, LOOKUP_NORMAL, arg1, arg2, > @@ -6601,10 +6595,6 @@ build_x_vec_perm_expr (location_t loc, > || type_dependent_expression_p (arg1) > || type_dependent_expression_p (arg2)) > return build_min_nt_loc (loc, VEC_PERM_EXPR, arg0, arg1, arg2); > - arg0 =3D build_non_dependent_expr (arg0); > - if (arg1) > - arg1 =3D build_non_dependent_expr (arg1); > - arg2 =3D build_non_dependent_expr (arg2); > } > tree exp =3D c_build_vec_perm_expr (loc, arg0, arg1, arg2, complain & = tf_error); > if (processing_template_decl && exp !=3D error_mark_node) > @@ -6632,9 +6622,6 @@ build_x_shufflevector (location_t loc, vec *args, > CALL_EXPR_IFN (exp) =3D IFN_SHUFFLEVECTOR; > return exp; > } > - arg0 =3D build_non_dependent_expr (arg0); > - arg1 =3D build_non_dependent_expr (arg1); > - /* ??? Nothing needed for the index arguments? */ > } > auto_vec mask; > for (unsigned i =3D 2; i < args->length (); ++i) > @@ -6804,8 +6791,6 @@ build_x_unary_op (location_t loc, enum tree_code co= de, cp_expr xarg, > TREE_TYPE (e) =3D build_dependent_operator_type (lookups, code,= false); > return e; > } > - > - xarg =3D build_non_dependent_expr (xarg); > } > > exp =3D NULL_TREE; > @@ -6923,8 +6908,6 @@ cp_build_addressof (location_t loc, tree arg, tsubs= t_flags_t complain) > { > if (type_dependent_expression_p (arg)) > return build_min_nt_loc (loc, ADDRESSOF_EXPR, arg, NULL_TREE); > - > - arg =3D build_non_dependent_expr (arg); > } > > tree exp =3D cp_build_addr_expr_strict (arg, complain); > @@ -7859,10 +7842,6 @@ build_x_conditional_expr (location_t loc, tree ife= xp, tree op1, tree op2, > || (op1 && type_dependent_expression_p (op1)) > || type_dependent_expression_p (op2)) > return build_min_nt_loc (loc, COND_EXPR, ifexp, op1, op2); > - ifexp =3D build_non_dependent_expr (ifexp); > - if (op1) > - op1 =3D build_non_dependent_expr (op1); > - op2 =3D build_non_dependent_expr (op2); > } > > expr =3D build_conditional_expr (loc, ifexp, op1, op2, complain); > @@ -7983,8 +7962,6 @@ build_x_compound_expr (location_t loc, tree op1, tr= ee op2, > =3D build_dependent_operator_type (lookups, COMPOUND_EXPR, fa= lse); > return result; > } > - op1 =3D build_non_dependent_expr (op1); > - op2 =3D build_non_dependent_expr (op2); > } > > result =3D build_new_op (loc, COMPOUND_EXPR, LOOKUP_NORMAL, op1, op2, > @@ -8556,8 +8533,6 @@ build_static_cast (location_t loc, tree type, tree = oexpr, > protected_set_expr_location (result, loc); > return result; > } > - else if (processing_template_decl) > - expr =3D build_non_dependent_expr (expr); > > /* build_c_cast puts on a NOP_EXPR to make the result not an lvalue. > Strip such NOP_EXPRs if VALUE is being used in non-lvalue context. = */ > @@ -9737,9 +9712,6 @@ build_x_modify_expr (location_t loc, tree lhs, enum= tree_code modifycode, > =3D build_dependent_operator_type (lookups, modifycode, tru= e); > return rval; > } > - > - lhs =3D build_non_dependent_expr (lhs); > - rhs =3D build_non_dependent_expr (rhs); > } > > tree rval; > @@ -11230,9 +11202,6 @@ check_return_expr (tree retval, bool *no_warning,= bool *dangling) > if (VOID_TYPE_P (functype)) > return error_mark_node; > > - if (processing_template_decl) > - retval =3D build_non_dependent_expr (retval); > - > /* Under C++11 [12.8/32 class.copy], a returned lvalue is sometime= s > treated as an rvalue for the purposes of overload resolution to > favor move constructors over copy constructors. > diff --git a/gcc/cp/typeck2.cc b/gcc/cp/typeck2.cc > index cd1ea045720..5ac8d3d08e9 100644 > --- a/gcc/cp/typeck2.cc > +++ b/gcc/cp/typeck2.cc > @@ -2218,7 +2218,6 @@ build_x_arrow (location_t loc, tree expr, tsubst_fl= ags_t complain) > TREE_TYPE (expr) =3D ttype; > return expr; > } > - expr =3D build_non_dependent_expr (expr); > } > > if (MAYBE_CLASS_TYPE_P (type)) > -- > 2.42.0.270.gbcb6cae296 >