From patchwork Tue Oct 31 11:34:19 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Iain Buclaw X-Patchwork-Id: 160068 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b90f:0:b0:403:3b70:6f57 with SMTP id t15csp168309vqg; Tue, 31 Oct 2023 04:34:49 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHGWPAUG5r4+aAW+Btf+CcGppEi0/Yz1b6S2i1Zy/ZA+QXYOyjLtrcqzM6PlikS3Bh8LmRO X-Received: by 2002:a05:6871:a50e:b0:1d6:8b7f:ce89 with SMTP id wc14-20020a056871a50e00b001d68b7fce89mr13874636oab.51.1698752088972; Tue, 31 Oct 2023 04:34:48 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1698752088; cv=pass; d=google.com; s=arc-20160816; b=Zv6v/BhYXPgwTTB0QJ4sMtAXLKEgQVzKeLmCAlwYeKwwZQQ3IIM6p3TKi7PhOCnM5P 075l/2FCGO3ihG1LoLGN5sXXdB/NDG7Xtm33ZSMz/Xf/l4KLc8KWGZh3LsOobgMLLtu0 We1my1ADgD315CF4uVUfqUpYPC4ETDt5bZedSqsnp65cqc9+p2EwsCu8RwFVx0U5C3Z7 8Bc+ReafOQcSfa6Z/VDR6SrUo/HngeecbGzuzeHnEQjnyjZknyLpeggccU93dOdSOKJx 1C/gbp/UXpsPv2oGmN/Wha180PJBRsxO9lmBg0Gf5pak1D0p+jwx2w4Iy3+T7PjijLk5 OhgA== 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=3Ngmjqgu0OPVMdisKwF6mNHAgJhn3ETY3DVX/Y8/L5s=; fh=D2tRalIjW6KCgVuqwFHStdMb9uqe8HSQc2WEvRJ6uLE=; b=B5a3IrBtovBmG6X3ZHBdgRSC6HrfhYzak2/F4MgbEthjKOlal4Dse0yzldeUE+jezg WdendI4M3XLOyU8+wvAkKEQvvhsTLqz9ol6gyuVUEBt4+K1+DCvPLWaowOjq+k9XGShu Hi9mwDXuiocUqZpjrX+1eGc8KbLrjDPijCmr/8B77LUmXa7b2fANM0eF82mcATGMajA3 3r9A1GYOc6fFHDVvqfu868bzVOndglrTOCob/ArBHVx7CluRKXl+UN5x0mbW6pJOAXyA cat0YWUZHU4o5zuZa3cWSTXXsGtRMq4E6IJgVwwdvymH+oQCpnl2rBe9bo3ZORRh4B5y Wjog== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gdcproject.org header.s=MBO0001 header.b=N+TyRjfW; arc=pass (i=1); spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=gdcproject.org Received: from server2.sourceware.org (server2.sourceware.org. [8.43.85.97]) by mx.google.com with ESMTPS id v10-20020ac8578a000000b00419576c2d0bsi908158qta.548.2023.10.31.04.34.48 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 31 Oct 2023 04:34:48 -0700 (PDT) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) client-ip=8.43.85.97; Authentication-Results: mx.google.com; dkim=pass header.i=@gdcproject.org header.s=MBO0001 header.b=N+TyRjfW; arc=pass (i=1); spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=gdcproject.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id B7E093858418 for ; Tue, 31 Oct 2023 11:34:48 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mout-p-101.mailbox.org (mout-p-101.mailbox.org [80.241.56.151]) by sourceware.org (Postfix) with ESMTPS id 080B53858D33 for ; Tue, 31 Oct 2023 11:34:26 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 080B53858D33 Authentication-Results: sourceware.org; dmarc=pass (p=quarantine dis=none) header.from=gdcproject.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gdcproject.org ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 080B53858D33 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=80.241.56.151 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1698752067; cv=none; b=swxTx4gWbmktykxm/qNt8ZzkW/WHaP9ml+XH+mc2C+5E/kKvybfxHKBRgnrmFRLLHfMagX4PYsq3ahGfgI3KN78uM7l02j3VduK75yfPPMg0aDB/9+DeJ1xYNqsnRnIkRAKgdo2DtglT/3JEoQHd2S9HP3rKVyqEdt5GoTJTdrA= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1698752067; c=relaxed/simple; bh=99qOzgs2ZApTfWicUDUPuZdsSlkUXS/96dqcqgDO9DY=; h=DKIM-Signature:From:To:Subject:Date:Message-Id:MIME-Version; b=t4dicDmzP4zids5Wq/Nolx+4FkI5hgRc7vO/IgI570Br3PvUOyWMiZvfZTT611x3nPRkgOpPgHClJOsLew0k6Ftb12II/6RmcMdFjwl3AKKQXeuHMqUDpVFXU4fmoQnYjdWB468fqBrc8tuoUE6WXlUpmiGyIyeTbt0sBAOmgHc= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from smtp202.mailbox.org (smtp202.mailbox.org [10.196.197.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-101.mailbox.org (Postfix) with ESMTPS id 4SKShv0DG3z9ssS; Tue, 31 Oct 2023 12:34:23 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gdcproject.org; s=MBO0001; t=1698752063; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=3Ngmjqgu0OPVMdisKwF6mNHAgJhn3ETY3DVX/Y8/L5s=; b=N+TyRjfW8lz26eEQUGCaFpVbSXi2YiteUuQ83TuQj6dCVTOoUYAm93ISraQ3Y2iw0Mimt3 zcOMB/zRcmwNTUNpvFYdkx7qGfUMTZOpXh7gtzmrEiWO6SwpP6wxSGN5C7kDowEBcFrWDN WKvn9GBgvfFGi8Y9g5EY8t0H4sMlfdNQVEgbeanDUvxEs0kREZShZ30jiqp37KxSfSM6uA y59QHAXs6heaWHdbRirUHi1w6CbmltjmUFP+VThoECIJAjC3t+oNZYaSCJ3Rx6FMt8/GrD VlWXfKa7wz0hmRGQCtOupTYwlAxjjvF/TUxA3UWPYWvyVusYZ02cIg50NtXFLw== From: Iain Buclaw To: gcc-patches@gcc.gnu.org Cc: Iain Buclaw Subject: [committed] d: Clean-up unused variable assignments after interface change Date: Tue, 31 Oct 2023 12:34:19 +0100 Message-Id: <20231031113419.480966-1-ibuclaw@gdcproject.org> MIME-Version: 1.0 X-Spam-Status: No, score=-13.1 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_LOW, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham 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: 1781270670345899974 X-GMAIL-MSGID: 1781270670345899974 Hi, The lowering done for invoking `new' on a single dimension array was moved from the code generator to the front-end semantic pass in r14-4996. This removes the detritus left behind in the code generator from that deletion. Bootstrapped and regression tested on x86_64-linux-gnu/-m32, committed to mainline. Regards, Iain. --- gcc/d/ChangeLog: * expr.cc (ExprVisitor::visit (NewExp *)): Remove unused assignments. --- gcc/d/expr.cc | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/gcc/d/expr.cc b/gcc/d/expr.cc index ef4ea60ffed..17801a3bd1e 100644 --- a/gcc/d/expr.cc +++ b/gcc/d/expr.cc @@ -2357,9 +2357,6 @@ public: else if (tb->ty == TY::Tarray) { /* Allocating memory for a new D array. */ - tb = e->newtype->toBasetype (); - TypeDArray *tarray = tb->isTypeDArray (); - gcc_assert (e->arguments && e->arguments->length >= 1); if (e->arguments->length == 1) @@ -2403,7 +2400,8 @@ public: size_int (e->arguments->length), build_address (var)); - result = build_libcall (libcall, tb, 2, tinfo, dims); + result = build_libcall (libcall, e->newtype->toBasetype (), 2, + tinfo, dims); } if (e->argprefix)