From patchwork Fri Oct 20 17:36:30 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Patrick Palka X-Patchwork-Id: 156245 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:2010:b0:403:3b70:6f57 with SMTP id fe16csp1221268vqb; Fri, 20 Oct 2023 10:38:25 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHCB5HqFiUaeh4W5yBG8mPMznHxTMaZuWHHNcI54w9w+g6bSHYdEsweNIenwvkgcMDgp/Eo X-Received: by 2002:a05:620a:1aaa:b0:773:a809:f059 with SMTP id bl42-20020a05620a1aaa00b00773a809f059mr2603578qkb.17.1697823505768; Fri, 20 Oct 2023 10:38:25 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1697823505; cv=pass; d=google.com; s=arc-20160816; b=jRaPTYoLw50+lm1ubsB0UG9zXC1fSx0QVxtTdcJgS0I2XGdA0iN/Bsbu5yJPtTUntE s13iuCgn4jfJy9vnCVXr5F1HTPuGf5tX1SLHdgYicOvIUcAeXTSE+HaQvFDHOH+Pc24V FOjZJmrsiySw8gaRYqcfUtuoaaSN/44m3VYuVYvvibJV6tZIYN63E4n6eMuF+Nhm2To3 lwUc5rgW1FjfB/+TIRAQ6GqGJnVThCDYIlnyNZ3MnA0jRgScFck30XYGK0AhRATmTNQv Hv4/WBtE5dsPQZJmBlCfAFFhQI8tTCLR8AZOijAGQG1HfRd55DdSvDJKh5CBPctQ7VL4 +sEA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:message-id:date:subject:cc:to:from:dkim-signature :arc-filter:dmarc-filter:delivered-to; bh=ld3YIg4uht75DzcnutgKhg0XciKZiP4SXL6KxT8nR7M=; fh=p3O4woyoGhSYZ7nIqgAbFsexPKGTpFBIye/UcVHG6WY=; b=gFoQJfRx5PRrXtqc1VxaSE2hqv4TuYKRPcJ2isNKlQmqLP5g35miMgvbAAKKuFyjFr p99WcYqShq1omiVkZRkA7KhZXfhR1YaTVcCwQGHwAACfiP+Jlh2R4rr+8RP1hfp2unbn jLnzaWxMwB84wuVhp9Druw75ZwMn/HVXGwne2Op2Wfb8AshIZUKMqeH7ocxwe1mHojYW 9lB0WN+qYzQRPfZlGYyyv1u/g5KxVLDVWZ3pc8q2CZJ5/0Ui9H6Ovart77v1VDPhIDC1 U0tfNTKORf9UyaxcuIYr1QDloQvjMONe59dLAXMNPWj9NVztp59fG8FWY2fNlEMTdCIG sceg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=FYkGhE9a; arc=pass (i=1); spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from server2.sourceware.org (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id m21-20020a05620a291500b007682f9ca13fsi1692584qkp.608.2023.10.20.10.38.25 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 20 Oct 2023 10:38:25 -0700 (PDT) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) client-ip=2620:52:3:1:0:246e:9693:128c; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=FYkGhE9a; arc=pass (i=1); spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 83329385772F for ; Fri, 20 Oct 2023 17:38:25 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTPS id 6956E3858D20 for ; Fri, 20 Oct 2023 17:38:02 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 6956E3858D20 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 6956E3858D20 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=170.10.133.124 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1697823483; cv=none; b=JV5yLos6g8/Wf57QgekgjDk16YzK8qJKIsJVrNYD/ziGylCz1BBiS3uAFVL9DTuzCvZx0sPZrS8MjifVHGkZXlQTtKMgJOEonsBHnD6LtJ8FSXE7hyJFH8WsbDVYglo3sLHksY9/8IqWCQrIAQ2MfB+rGvf+PGHDtHKJpoeOoyw= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1697823483; c=relaxed/simple; bh=y/kta2LpWGbbUaIgthGrx8Cmcw0weG601VzWxYYqelY=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=wOnNU/SbgkiOhW6sW0H8OWXelfTOyqdl/hLVJjWaMHOzzzF40BYwpRIW/A02wX2oSx/NIaQaHNe8dkMFw/6k8q+C9uEwpvqAmralATp8+g8wMt/W2Ut3QaF8XiWNFIAOJ7ItbWQZwU7sOkqvvNnp3b7+WaFL7VFLNr1/zWUQ4+I= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1697823482; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ld3YIg4uht75DzcnutgKhg0XciKZiP4SXL6KxT8nR7M=; b=FYkGhE9aMUUEqcC5iKOcRkRjRIbYIZlshBHkSJYSaTxv7SHNpI0/egKsrcNjnpkiaiOPf3 N+j2wmGaLezV2dRKNj5TlQb/7R4CcRNES4d3sA/Q9bJWeNNFdV1YAxqoFWJH7DOU65kXth 6FcEjT3KBP/eG+shWpao2baKr4n/egA= Received: from mail-ot1-f69.google.com (mail-ot1-f69.google.com [209.85.210.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-437-JE9NYXshO8aUYZK9R3w6aw-1; Fri, 20 Oct 2023 13:36:36 -0400 X-MC-Unique: JE9NYXshO8aUYZK9R3w6aw-1 Received: by mail-ot1-f69.google.com with SMTP id 46e09a7af769-6ce270bc429so1529317a34.2 for ; Fri, 20 Oct 2023 10:36:36 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697823395; x=1698428195; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=ld3YIg4uht75DzcnutgKhg0XciKZiP4SXL6KxT8nR7M=; b=Sz/RIY0VjqBSFGwg1/IHrWMIrQ19ImSDDe6wtN3Ivg9vQ+YpcHS7zALkhha862KvWK dr4W1iEdkcDR7bDAwP01nMLTFrksyQ88pPEdJ9RBQ64O6LCEvX9+r/TQlzzIhMd5m/Dg YprTx9Esr5f2pAd36uNmNzYqE1YS3SD0kOer47CYRYf9rfErFhNq9AIEvTad+iMROUoE 0L14DgA4bGBq51jradhbRT4qMJ1bhjZUsvMBa0izaQdNr1lZMt4U1t6trzkbSymtdLaN milysJgXLfGhGPIh7/1SblnsL/KRbJ6R52bSNQyaRJTACsVQSEyxclNug2IwfHd5NYbO S9sA== X-Gm-Message-State: AOJu0Yxq+26acCXYYpZRKu+nwtmsqZNVC05fpNeLn4JiZND+8rFWvvzT uE9DMgVfjPqysK7wjDChXL53tfh6ybXLuyKO2sEsRXHJp+RenDoXDW44jhWWaBHDK7OypfMAS7v sI1x8VfDeIif3Av+Ztq+TfBdy6Uk+kFMsGahkZne5wSQUt+gGLUceyybIcN8PsHz01czMro1wp5 k= X-Received: by 2002:a05:6870:1707:b0:1bb:84af:bf8f with SMTP id h7-20020a056870170700b001bb84afbf8fmr2747837oae.58.1697823395507; Fri, 20 Oct 2023 10:36:35 -0700 (PDT) X-Received: by 2002:a05:6870:1707:b0:1bb:84af:bf8f with SMTP id h7-20020a056870170700b001bb84afbf8fmr2747818oae.58.1697823395145; Fri, 20 Oct 2023 10:36:35 -0700 (PDT) Received: from localhost.localdomain (ool-457670bb.dyn.optonline.net. [69.118.112.187]) by smtp.gmail.com with ESMTPSA id m11-20020ad44b6b000000b0066cf4fa7b47sm858280qvx.4.2023.10.20.10.36.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 20 Oct 2023 10:36:34 -0700 (PDT) From: Patrick Palka To: gcc-patches@gcc.gnu.org Cc: jason@redhat.com, gcc-rust@gcc.gnu.org, Patrick Palka Subject: [PATCH] rust: build failure after NON_DEPENDENT_EXPR removal [PR111899] Date: Fri, 20 Oct 2023 13:36:30 -0400 Message-ID: <20231020173630.2328347-1-ppalka@redhat.com> X-Mailer: git-send-email 2.42.0.411.g813d9a9188 MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-Spam-Status: No, score=-13.6 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_NONE, TXREP autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1780296980387978275 X-GMAIL-MSGID: 1780296980387978275 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.) 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-constexpr.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.cc 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] = 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_ordinary); - case NON_DEPENDENT_EXPR: case PAREN_EXPR: return lvalue_kind (TREE_OPERAND (ref, 0));