From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from esa3.mentor.iphmx.com (esa3.mentor.iphmx.com [68.232.137.180]) by sourceware.org (Postfix) with ESMTPS id 9B2313858D39; Mon, 23 Oct 2023 09:10:24 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 9B2313858D39 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=codesourcery.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=mentor.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 9B2313858D39 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=68.232.137.180 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1698052227; cv=none; b=qizKoZqmBGYVG/bW2+cSAnPT2wjGLTDD+sKlOz2uL3dlr5ePi1fzoW80GkpflDbLWracEOIQVylBMPwqpVJLopuIpZ0uBbqVNq9O0YhLyPujDRFzzXpFk2SG/Oh+TT2YSK79gLPCGTTaU0G5ALVjy/08BCYChtFDPUc/Im/oWgY= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1698052227; c=relaxed/simple; bh=doNuuzKmloCxtQL3Ww7RfJ1xxydDT83kNiIRAKzHRjE=; h=From:To:Subject:Date:Message-ID:MIME-Version; b=pZn+HyD4uBdB6QPAKKOQsby+/E5Gnl2U2MQCj5ytYVTL1Zp+hlRLY7nh+3Wzj0DRJBQzh5UGZWjcvD4dqJRDj4TwnpKJt6mtxt/MJ01GqktvBmk8uBKixJEj6mY63sX6pdC5zQg7aPzIAapF1vWxZRqI3sXyZtLo2w+8FXH5u9k= ARC-Authentication-Results: i=1; server2.sourceware.org X-CSE-ConnectionGUID: YMmRpmjeTxunMugeBEYUaw== X-CSE-MsgGUID: gl4VoLZ+SSafuMy8IKEtiA== X-IronPort-AV: E=Sophos;i="6.03,244,1694764800"; d="scan'208";a="20458173" Received: from orw-gwy-01-in.mentorg.com ([192.94.38.165]) by esa3.mentor.iphmx.com with ESMTP; 23 Oct 2023 01:10:18 -0800 IronPort-SDR: 2xmr7gwgSmmjxyE0NRgNT7nyDABRA9hjMrt/NMu//uF2tGtI2B7AgT9pGfuK4uVZSy0iUJMV+u Ks5bfWwxOzLvd5iRp9P+5Bk/MifZ7aSw2NL9j7wrTGXVhbct8IRi41Oc68Y8GmOq80msD9+z1m BAih2HW3veCgPC7QJfr05aBAxqu4WmAFQPzrj6C/j7yQBn3XUKUdyFXj5X5jVwzfXlFHaxpgYv fI/1imW/AWyp+KxpRiFWivo4VSn3DIPVUZ5WhANN0rxhEVzvz+wunvDlPmhRGZXuf0iMD30bC4 WJM= From: Thomas Schwinge To: Patrick Palka , CC: , , Faisal Abbas <90.abbasfaisal@gmail.com> Subject: Re: [PATCH] rust: build failure after NON_DEPENDENT_EXPR removal [PR111899] In-Reply-To: <20231020173630.2328347-1-ppalka@redhat.com> References: <20231020173630.2328347-1-ppalka@redhat.com> User-Agent: Notmuch/0.29.3+94~g74c3f1b (https://notmuchmail.org) Emacs/28.2 (x86_64-pc-linux-gnu) Date: Mon, 23 Oct 2023 11:10:10 +0200 Message-ID: <87msw93dsd.fsf@euler.schwinge.homeip.net> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Originating-IP: [137.202.0.90] X-ClientProxiedBy: svr-ies-mbx-12.mgc.mentorg.com (139.181.222.12) To svr-ies-mbx-10.mgc.mentorg.com (139.181.222.10) X-Spam-Status: No, score=-11.8 required=5.0 tests=BAYES_00,GIT_PATCH_0,HEADER_FROM_DIFFERENT_DOMAINS,KAM_DMARC_STATUS,KAM_SHORT,SPF_HELO_PASS,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: Hi Patrick! On 2023-10-20T13:36:30-0400, Patrick Palka wrote: > Built on x86_64-pc-linux-gnu, pushed to trunk as obvious (hopefully). > > -- >8 -- > > This patch removes stray NON_DEPENDENT_EXPR checks following the removal > of this tree code from the C++ FE. (Since this restores the build I > supppose it means the Rust FE never creates NON_DEPENDENT_EXPR trees in > the first place, so no further analysis is needed.) ACK, thanks! For context: indeed, a non-trivial amount of C++ front end 'constexpr' code was copied into the Rust front end, for implementing related Rust functionality, mostly as part of the 2022 GSoC project "Support for Constant Folding in Rust Frontend" (Faisal Abbas), . Yes, this should eventually be cleaned up (and merged with the original C++ front end code, as much as feasible -- which I don't know whether or to which extent it is). Gr=C3=BC=C3=9Fe Thomas > PR rust/111899 > > gcc/rust/ChangeLog: > > * backend/rust-constexpr.cc (potential_constant_expression_1): > Remove NON_DEPENDENT_EXPR handling. > * backend/rust-tree.cc (mark_exp_read): Likewise. > (mark_use): Likewise. > (lvalue_kind): Likewise. > --- > gcc/rust/backend/rust-constexpr.cc | 1 - > gcc/rust/backend/rust-tree.cc | 3 --- > 2 files changed, 4 deletions(-) > > diff --git a/gcc/rust/backend/rust-constexpr.cc b/gcc/rust/backend/rust-c= onstexpr.cc > index b28fa27b2d0..a7ae4166ea0 100644 > --- a/gcc/rust/backend/rust-constexpr.cc > +++ b/gcc/rust/backend/rust-constexpr.cc > @@ -6151,7 +6151,6 @@ potential_constant_expression_1 (tree t, bool want_= rval, bool strict, bool now, > case CLEANUP_POINT_EXPR: > case EXPR_STMT: > case PAREN_EXPR: > - case NON_DEPENDENT_EXPR: > /* For convenience. */ > case LOOP_EXPR: > case EXIT_EXPR: > diff --git a/gcc/rust/backend/rust-tree.cc b/gcc/rust/backend/rust-tree.c= c > index 66e859cd70c..7040c75f825 100644 > --- a/gcc/rust/backend/rust-tree.cc > +++ b/gcc/rust/backend/rust-tree.cc > @@ -72,7 +72,6 @@ mark_exp_read (tree exp) > case ADDR_EXPR: > case INDIRECT_REF: > case FLOAT_EXPR: > - case NON_DEPENDENT_EXPR: > case VIEW_CONVERT_EXPR: > mark_exp_read (TREE_OPERAND (exp, 0)); > break; > @@ -128,7 +127,6 @@ mark_use (tree expr, bool rvalue_p, bool read_p, > switch (TREE_CODE (expr)) > { > case COMPONENT_REF: > - case NON_DEPENDENT_EXPR: > recurse_op[0] =3D true; > break; > case COMPOUND_EXPR: > @@ -4520,7 +4518,6 @@ lvalue_kind (const_tree ref) > lvalues. */ > return (DECL_NONSTATIC_MEMBER_FUNCTION_P (ref) ? clk_none : clk_or= dinary); > > - case NON_DEPENDENT_EXPR: > case PAREN_EXPR: > return lvalue_kind (TREE_OPERAND (ref, 0)); > > -- > 2.42.0.411.g813d9a9188 ----------------- Siemens Electronic Design Automation GmbH; Anschrift: Arnulfstra=C3=9Fe 201= , 80634 M=C3=BCnchen; Gesellschaft mit beschr=C3=A4nkter Haftung; Gesch=C3= =A4ftsf=C3=BChrer: Thomas Heurung, Frank Th=C3=BCrauf; Sitz der Gesellschaf= t: M=C3=BCnchen; Registergericht M=C3=BCnchen, HRB 106955