From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr1-x42e.google.com (mail-wr1-x42e.google.com [IPv6:2a00:1450:4864:20::42e]) by sourceware.org (Postfix) with ESMTPS id AF59E3850859 for ; Tue, 6 Sep 2022 07:15:53 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org AF59E3850859 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-wr1-x42e.google.com with SMTP id k9so14056567wri.0 for ; Tue, 06 Sep 2022 00:15:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=adacore.com; s=google; h=content-disposition:mime-version:message-id:subject:cc:to:from:date :from:to:cc:subject:date; bh=jLARXqcUwb0rLtygG+jz/8tfhfqGKGGShaM74pfAO1o=; b=JtK79p7P6qK1qbI0kvvZ1H06FrbPVlZDlB0G4FFBx590dNqmyDB/fCOBygpEhpux1c hBlc4Smj6BcGJ+IMZqkGxXDiJlvxsNJhpXbogaBe+J3A5Sb+nN9QJsXnyccO1zIBO1Kk gwk5gMXyW9F9UjcTp58bWUvNGzhRmxmjaT/8Bf2tf08ETkK1Ttc3G5D5U/HNccjR/baZ 2k3Xamt0TKSXT41Ca42t7ZNELxwqvz+KfzEr5hUwuqTbWBXq+CTSSHE07iGTeGbf2nnw Hslhq2ipGaBrQTKwqMkuAyhmwl0wFcfvLpfMnrLs+qSkv3kBVeOuy6jFQ8bSqVoAtczz xs+A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-disposition:mime-version:message-id:subject:cc:to:from:date :x-gm-message-state:from:to:cc:subject:date; bh=jLARXqcUwb0rLtygG+jz/8tfhfqGKGGShaM74pfAO1o=; b=PEX52RYoLQpJG3MrnpdWlRODWuA2G2aH11A/t46upRqSOqyiQJt2L1UuShvlEPmO6Y iO8eF4YVCvU+FDxDLVig6o+dNJLS7eUseVnnKu18qO7SR7ieadYKHE7caKPuqkQgl3cm /seAQs9mRzIWTgdswZw+X7+R+FvlfaEiTwayUWfOxHvloHmfLsG8hfO2g7b7DSufMVKh Y7f31aswPxn/Q4YnD4gbWPt3bn5Vzz2P3mtGD6y58xp+GDCqJPucPvgZS/sc+iWzQ0o1 BaDlHakxRd2GQO69AWF8NH9KkpesdkyTSCK/hAOrDBZIuPqdjn9hZbcPSEWlDu4T+jHI 37oQ== X-Gm-Message-State: ACgBeo0mDRrynZdzVWBMXXdAZ4XC2UFkJRVJDtN6iAM/W8xBXBDl1U2x ylK7Tjjquif//4Sp/7lHTZd1vZVnxEjAgg== X-Google-Smtp-Source: AA6agR5CRNmDVNqxil05YgNkOMGBKnoHHIhDsS2ylMImZYtj6bgBJVCa3/Mp0amW70KohB0nuJ6seg== X-Received: by 2002:a5d:6106:0:b0:226:e79f:5c2 with SMTP id v6-20020a5d6106000000b00226e79f05c2mr17184793wrt.284.1662448552677; Tue, 06 Sep 2022 00:15:52 -0700 (PDT) Received: from poulhies-Precision-5550 (static-176-191-105-132.ftth.abo.bbox.fr. [176.191.105.132]) by smtp.gmail.com with ESMTPSA id v22-20020a7bcb56000000b003a5ad7f6de2sm13430077wmj.15.2022.09.06.00.15.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 06 Sep 2022 00:15:52 -0700 (PDT) Date: Tue, 6 Sep 2022 09:15:51 +0200 From: Marc =?iso-8859-1?Q?Poulhi=E8s?= To: gcc-patches@gcc.gnu.org Cc: Piotr Trojanek Subject: [Ada] Cleanup unnecessary shadowing in expansion of attribute Old Message-ID: <20220906071551.GA1280376@poulhies-Precision-5550> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="7AUc2qLy4jB3hD7Z" Content-Disposition: inline X-Spam-Status: No, score=-12.9 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,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 List-Id: --7AUc2qLy4jB3hD7Z Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Code cleanup; semantics is unaffected. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * exp_attr.adb (Expand_N_Attribute_Reference [Attribute_Old]): Remove unnecessary local constant that was shadowing another constant with the same initial value. --7AUc2qLy4jB3hD7Z Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="patch.diff" diff --git a/gcc/ada/exp_attr.adb b/gcc/ada/exp_attr.adb --- a/gcc/ada/exp_attr.adb +++ b/gcc/ada/exp_attr.adb @@ -4884,7 +4884,6 @@ package body Exp_Attr is --------- when Attribute_Old => Old : declare - Typ : constant Entity_Id := Etype (N); CW_Temp : Entity_Id; CW_Typ : Entity_Id; Decl : Node_Id; --7AUc2qLy4jB3hD7Z--