From patchwork Thu May 12 12:40:13 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pierre-Marie de Rodat X-Patchwork-Id: 1630182 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.a=rsa-sha256 header.s=default header.b=bTQSLN64; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=2620:52:3:1:0:246e:9693:128c; helo=sourceware.org; envelope-from=gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Received: from sourceware.org (server2.sourceware.org [IPv6:2620:52:3:1:0:246e:9693:128c]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4KzX6Y5r7Tz9sGF for ; Thu, 12 May 2022 23:04:21 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 366E13839430 for ; Thu, 12 May 2022 13:04:19 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 366E13839430 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1652360659; bh=qEYmqaDr0LNY29a/Q+4A98HWfLaTO4IILgbRPWiNoVI=; h=Date:To:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:Cc:From; b=bTQSLN64yU/YLS++s2LD7cLHSUYx4mIAaqekLQTv8KXXlk/Zkq+QtQhCr72HPZu2y KFTYHfeGVZAvgUUhXvVknaMa+ul/FDQ77fVvhTzWf6o2yr75qcHAQGmR0cSlto6RJ2 fzFIc1ytHIDlTuyDHGRrd4PB0xSlba7gvEI31C7Q= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-wr1-x430.google.com (mail-wr1-x430.google.com [IPv6:2a00:1450:4864:20::430]) by sourceware.org (Postfix) with ESMTPS id 2D634383E810 for ; Thu, 12 May 2022 12:40:15 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 2D634383E810 Received: by mail-wr1-x430.google.com with SMTP id m1so7067607wrb.8 for ; Thu, 12 May 2022 05:40:15 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:mime-version :content-disposition; bh=qEYmqaDr0LNY29a/Q+4A98HWfLaTO4IILgbRPWiNoVI=; b=I2Q3ThRcZpa4bYW8FVh5+SSZqQaX0ie1rlBo7lCyjHthYubw9vH+dhMWO0SgX6L1ky spZcFiStGt66SwKGlS861d9QszwcHIShBgoN/yetiyNXjxT9MrTWL23iTGcevEs8Qg3o 71xvVnnyTzPw//VmWg6F+lxlD3K0/DIaoQGBxWmmKFDOYQ1y1Ht4ZMGEcNeNUMqj87MG v0K3qeR1ywDwlVeF662j6sCdnQ2qucQ2zw4boJpSt60mveFJzwtXXzK8hOq9LEQg81HQ ne4/oJXj4doVGMTvrq0A+yc2tlQtEz7jldZICRZfcXKwxeRydwhZCj8OVB/cYA4bxZkH BvlA== X-Gm-Message-State: AOAM533JwXytKoqrnAuk7WA2Jj+PwDSLFgVQ2lIuTE01BneyEmYwWKh4 SMxJ4VX4I2Wyvehx0xlqXc9xbw8uDpQ+yA== X-Google-Smtp-Source: ABdhPJw0fCzSq9W5eMzArPV862OEm8kXs027UARboOtHDmP16EU7RST/JqfRIe5A12utDqkwB6lVzQ== X-Received: by 2002:adf:ea4a:0:b0:20a:ddfe:5b34 with SMTP id j10-20020adfea4a000000b0020addfe5b34mr26974952wrn.394.1652359214757; Thu, 12 May 2022 05:40:14 -0700 (PDT) Received: from adacore.com ([45.147.211.82]) by smtp.gmail.com with ESMTPSA id r15-20020a7bc08f000000b00394615cf468sm2597475wmh.28.2022.05.12.05.40.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 12 May 2022 05:40:14 -0700 (PDT) Date: Thu, 12 May 2022 12:40:13 +0000 To: gcc-patches@gcc.gnu.org Subject: [Ada] Remove unreferenced Is_Selector_Name routine Message-ID: <20220512124013.GA781165@adacore.com> MIME-Version: 1.0 Content-Disposition: inline X-Spam-Status: No, score=-12.8 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, KAM_ASCII_DIVIDERS, RCVD_IN_DNSWL_NONE, 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.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Pierre-Marie de Rodat via Gcc-patches From: Pierre-Marie de Rodat Reply-To: Pierre-Marie de Rodat Cc: Piotr Trojanek Errors-To: gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org Sender: "Gcc-patches" Function Is_Selector_Name was added in 1995 while experimenting with default expressions in record declarations. This experiment was abandoned after one day and this routine was never used since then. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * sem_util.ads (Is_Selector_Name): Remove spec. * sem_util.adb (Is_Selector_Name): Remove body. diff --git a/gcc/ada/sem_util.adb b/gcc/ada/sem_util.adb --- a/gcc/ada/sem_util.adb +++ b/gcc/ada/sem_util.adb @@ -20972,37 +20972,6 @@ package body Sem_Util is return False; end Is_Reversible_Iterator; - ---------------------- - -- Is_Selector_Name -- - ---------------------- - - function Is_Selector_Name (N : Node_Id) return Boolean is - begin - if not Is_List_Member (N) then - declare - P : constant Node_Id := Parent (N); - begin - return Nkind (P) in N_Expanded_Name - | N_Generic_Association - | N_Parameter_Association - | N_Selected_Component - and then Selector_Name (P) = N; - end; - - else - declare - L : constant List_Id := List_Containing (N); - P : constant Node_Id := Parent (L); - begin - return (Nkind (P) = N_Discriminant_Association - and then Selector_Names (P) = L) - or else - (Nkind (P) = N_Component_Association - and then Choices (P) = L); - end; - end if; - end Is_Selector_Name; - --------------------------------- -- Is_Single_Concurrent_Object -- --------------------------------- diff --git a/gcc/ada/sem_util.ads b/gcc/ada/sem_util.ads --- a/gcc/ada/sem_util.ads +++ b/gcc/ada/sem_util.ads @@ -2337,12 +2337,6 @@ package Sem_Util is -- AI05-0139-2: Check whether Typ is derived from the predefined interface -- Ada.Iterator_Interfaces.Reversible_Iterator. - function Is_Selector_Name (N : Node_Id) return Boolean; - -- Given an N_Identifier node N, determines if it is a Selector_Name. - -- As described in Sinfo, Selector_Names are special because they - -- represent use of the N_Identifier node for a true identifier, when - -- normally such nodes represent a direct name. - function Is_Single_Concurrent_Object (Id : Entity_Id) return Boolean; -- Determine whether arbitrary entity Id denotes the anonymous object -- created for a single protected or single task type.