From patchwork Tue Oct 10 12:14:55 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Marc_Poulhi=C3=A8s?= X-Patchwork-Id: 150722 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:2908:b0:403:3b70:6f57 with SMTP id ib8csp152318vqb; Tue, 10 Oct 2023 05:17:05 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGuZi0I/7ALbH+tf1pVk6nRfWQUxgsBx1d/qyWD6Ho0Lsj0dkKV7KnVxxBCKTqavi9+9IOC X-Received: by 2002:a17:906:3f04:b0:9ae:5568:b6a8 with SMTP id c4-20020a1709063f0400b009ae5568b6a8mr18080354ejj.10.1696940224915; Tue, 10 Oct 2023 05:17:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696940224; cv=none; d=google.com; s=arc-20160816; b=0WTAeTLQbWK+/UQTkZNv0c+RD6C+RstxIWLFxTVxzPAACC8i0OEqiJDFfi+b8UdTVI i5DJQr+WuIhIL9r64w2Yu85QQjT7yGYDLSqlw73VtmHgDd4ENBXx3ellUcfuJ/UL7ekx kAU/q9Kghpk52+EGyPD2FJsM6FbmigQuqJz2ip5xnkT1pKFxF+M1IFv/zZ/mWC5g4CbP zidZsRxSWB1Wuxro3WlMjEdMhLT/7bQTkIwDzW3s/Eqt+9E1XG7rXkpcUEO4snmGEVTM EbQtZJ9V/4toLDQxaxtkul3GeyXqeSc062YBpHlj0wNovFIDHtQGzfyCgK/W102qp9Ti suJQ== ARC-Message-Signature: i=1; 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 :dmarc-filter:delivered-to; bh=jqjiMLcJ9gx4Ksg5LQkPST9SFSNZHsflShT8mn6IOBM=; fh=hOhsC1930eHatDPYd2EALQ9Ry/g++vvN4vxlQkRuX+0=; b=FfXvB81QY0iroNMhhPvIicC4gvqqcg76xr6JpTLK1STTUcyCmvJbDr0yLsCb3nVDI8 krYC60j8vru0zcqcguN2Li+ZjOg55KmXFtXIOnVW3u2W+jlfDcLq5D3izrmJqCgGADJa 21thDjb/sVnF6ZQs/KWCS/s8mmzQcdx2k/OCtOyYBeoduNR4LoZIGXJefv5//RpMLw/t yxl4D8RZ55akcHqNRhKmwW8uh5YxAvJhhPjbfmzX0MHhwQU+qNwB2oLTN2t66UWs0JHG /uF8V0Zrc5Yn7qqEZSyjOU8SSs1nCpewedndbo5hp9o0zN0mkkczFN9VuIPohgT41ECD lYnw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@adacore.com header.s=google header.b=Ozt0WFAi; 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=adacore.com Received: from server2.sourceware.org (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id s3-20020a056402164300b005334545630asi5465613edx.212.2023.10.10.05.17.04 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Oct 2023 05:17:04 -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=@adacore.com header.s=google header.b=Ozt0WFAi; 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=adacore.com Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id BA1F33882664 for ; Tue, 10 Oct 2023 12:15:26 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-wm1-x331.google.com (mail-wm1-x331.google.com [IPv6:2a00:1450:4864:20::331]) by sourceware.org (Postfix) with ESMTPS id 5437B385B522 for ; Tue, 10 Oct 2023 12:14:58 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 5437B385B522 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=adacore.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=adacore.com Received: by mail-wm1-x331.google.com with SMTP id 5b1f17b1804b1-40566f8a093so51582445e9.3 for ; Tue, 10 Oct 2023 05:14:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=adacore.com; s=google; t=1696940097; x=1697544897; darn=gcc.gnu.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=jqjiMLcJ9gx4Ksg5LQkPST9SFSNZHsflShT8mn6IOBM=; b=Ozt0WFAiJDeTPV9fI/2Imkd523ZyT9qm/uWIz/s1aivaVTouuYMHzhHVkCnXog9SBs xWmtc+LuL/ppixLuBapIF/mYn9bAdHdLMlUGxNe8G5guMO03GdpKpJBsV+PZMqiVR4yV WvifR4JDoz+Skbf4XiF9WU2q4f4bltl6G/2EKCXXvJu/4TKeBdPeTR5LzHLUFyIHtkF+ 1X5CXhzor9zeKt/VP8iR4Kqd7G/5AjG2n3CdJVwxu/NtNSDAc8Cb3DXHkhD7fzGhh8lc vVOABxKGUNrrn+GnxltjXWheLzPKKs82DF+aDEW1uGeXDW+upZY28B3S+h+XLSw5aBSG RO7A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696940097; x=1697544897; 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=jqjiMLcJ9gx4Ksg5LQkPST9SFSNZHsflShT8mn6IOBM=; b=tB3AjHgTtQaHv73Y74NYTTPkTSLTnm7ls7+nkM1bsMr0rsgzarmAPKdVlOaNXnK9QM I/CB/zrLKr4tl9d56tDmw+alaqIAQHkSM7LMhaj4Te++lnDlEgz15AT3XtmLzLVfExiu 0bFVmHpcQQqWkczENi9KvzxXb0ioS7Q7QiBId7DnFH5/XnbQJ95797sZQOr6Ss2tK/nA ZVaHR7EAufy1e3vb1JQ0EX+XcKbPPZyKERStFeOFlaXwkoTdMF/9ehFMgkz4KdMKCkXV Hp05djjErPWRUxjl6jSwL/0LN3PuyYp5PH9T3X/sU1EZnnUKobl6HOvpwftCYJ5ATVFG mFrw== X-Gm-Message-State: AOJu0YzAmh79gLj5LwU/l1DsOnr1NJ+Uf8U++QrNr1HQmAhVOjtRAuOg WdONtP6ycu5b3fjANfMAzlZ+n+JacL9dqwtDsE+UMg== X-Received: by 2002:a05:600c:2210:b0:405:3cc5:1105 with SMTP id z16-20020a05600c221000b004053cc51105mr15595308wml.8.1696940096958; Tue, 10 Oct 2023 05:14:56 -0700 (PDT) Received: from poulhies-Precision-5550.telnowedge.local (lmontsouris-659-1-24-67.w81-250.abo.wanadoo.fr. [81.250.175.67]) by smtp.gmail.com with ESMTPSA id q8-20020a05600000c800b0032415213a6fsm12507471wrx.87.2023.10.10.05.14.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Oct 2023 05:14:56 -0700 (PDT) From: =?utf-8?q?Marc_Poulhi=C3=A8s?= To: gcc-patches@gcc.gnu.org Cc: Eric Botcazou Subject: [COMMITTED] ada: Remove superfluous setter procedure Date: Tue, 10 Oct 2023 14:14:55 +0200 Message-ID: <20231010121455.3888544-1-poulhies@adacore.com> X-Mailer: git-send-email 2.42.0 MIME-Version: 1.0 X-Spam-Status: No, score=-13.7 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, 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 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: 1779370792933400165 X-GMAIL-MSGID: 1779370792933400165 From: Eric Botcazou It is only called once. gcc/ada/ * sem_util.ads (Set_Scope_Is_Transient): Delete. * sem_util.adb (Set_Scope_Is_Transient): Likewise. * exp_ch7.adb (Create_Transient_Scope): Set Is_Transient directly. Tested on x86_64-pc-linux-gnu, committed on master. --- gcc/ada/exp_ch7.adb | 2 +- gcc/ada/sem_util.adb | 9 --------- gcc/ada/sem_util.ads | 3 --- 3 files changed, 1 insertion(+), 13 deletions(-) diff --git a/gcc/ada/exp_ch7.adb b/gcc/ada/exp_ch7.adb index 5049de54dd7..00b7692c964 100644 --- a/gcc/ada/exp_ch7.adb +++ b/gcc/ada/exp_ch7.adb @@ -4529,7 +4529,7 @@ package body Exp_Ch7 is Push_Scope (Trans_Scop); Scope_Stack.Table (Scope_Stack.Last).Node_To_Be_Wrapped := Context; - Set_Scope_Is_Transient; + Scope_Stack.Table (Scope_Stack.Last).Is_Transient := True; -- The transient scope must also manage the secondary stack diff --git a/gcc/ada/sem_util.adb b/gcc/ada/sem_util.adb index e778bab95d1..26ddb52bc4a 100644 --- a/gcc/ada/sem_util.adb +++ b/gcc/ada/sem_util.adb @@ -27792,15 +27792,6 @@ package body Sem_Util is end if; end Set_Rep_Info; - ---------------------------- - -- Set_Scope_Is_Transient -- - ---------------------------- - - procedure Set_Scope_Is_Transient (V : Boolean := True) is - begin - Scope_Stack.Table (Scope_Stack.Last).Is_Transient := V; - end Set_Scope_Is_Transient; - ------------------- -- Set_Size_Info -- ------------------- diff --git a/gcc/ada/sem_util.ads b/gcc/ada/sem_util.ads index 92016bc0eef..dda71e402b2 100644 --- a/gcc/ada/sem_util.ads +++ b/gcc/ada/sem_util.ads @@ -3165,9 +3165,6 @@ package Sem_Util is -- from sub(type) entity T2 to (sub)type entity T1, as well as Is_Volatile -- if T1 is a base type. - procedure Set_Scope_Is_Transient (V : Boolean := True); - -- Set the flag Is_Transient of the current scope - procedure Set_Size_Info (T1, T2 : Entity_Id); pragma Inline (Set_Size_Info); -- Copies the Esize field and Has_Biased_Representation flag from sub(type)