From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr1-x434.google.com (mail-wr1-x434.google.com [IPv6:2a00:1450:4864:20::434]) by sourceware.org (Postfix) with ESMTPS id BFD633858010 for ; Mon, 16 May 2022 08:43:22 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org BFD633858010 Received: by mail-wr1-x434.google.com with SMTP id d5so19502036wrb.6 for ; Mon, 16 May 2022 01:43:22 -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=Gp5RLifIfS7NBeE2Cg5jzcMJr/T7TjO2g69NsFX3ySc=; b=ptAILWEROoK9hnjVGgPF/A5ATKhVEwi7j7Z9kCxsVC2/pJXZ3rTYUbzNNZggdIqiJJ mkyXtjUXSwbdRKu7auOoEV+ML4g5t0iOISXlyKyBVeFEBjM6tQsEYEErJKnr0/ov3iVD HnAzAhKIhupnYBJ4Eiz+27hz3tNgtTwC1kGTpvmZzTRiU3m0l0d1iFgOZ6xmBppr0bqP ddVHHNHsiviJFuTZ+5zcq0gesIAaPUkimzDUbR6q/H3n9HBuOu2LAe7O8fURC5MsK3dL y0AxA+vV6USKihbwFRaODH0Zw6rB6PdENnbWsEYUQxwTAdilZd4WjR1NAXM+aadn1Pu5 G7nw== X-Gm-Message-State: AOAM530Oa7ZePK1tuXQV1VgEMrDE5YGt3E1ulc70ITF3wX9tBlxP9kt/ iqHqoPtco0T3kg8WCYuSJCA3ALI1+5xoww== X-Google-Smtp-Source: ABdhPJx1w4K8ONapqkOUTY7cN72QE3oXOzsolmQHz6K/fI4rs5yg4jMG5dxxAuz6ebGV9/DEuREiNg== X-Received: by 2002:adf:cd0a:0:b0:20c:b426:65da with SMTP id w10-20020adfcd0a000000b0020cb42665damr13228968wrm.664.1652690601556; Mon, 16 May 2022 01:43:21 -0700 (PDT) Received: from adacore.com ([45.147.211.82]) by smtp.gmail.com with ESMTPSA id u21-20020a7bc055000000b00394586f696dsm12643380wmc.11.2022.05.16.01.43.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 16 May 2022 01:43:21 -0700 (PDT) Date: Mon, 16 May 2022 08:43:20 +0000 From: Pierre-Marie de Rodat To: gcc-patches@gcc.gnu.org Cc: Piotr Trojanek Subject: [Ada] Remove useless code related to current value propagation Message-ID: <20220516084320.GA3843824@adacore.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="y0ulUmNC+osPPQO6" Content-Disposition: inline X-Spam-Status: No, score=-13.2 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 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-List-Received-Date: Mon, 16 May 2022 08:43:24 -0000 --y0ulUmNC+osPPQO6 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline The current value propagation applies only to assignable objects and doesn't make sense for subprogram entities. This was a mistake introduced when extending the current value propagation years ago. Cleanup related to fixing interference between expansion of attribute Loop_Entry and current value propagation. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * sem_attr.adb (Address_Checks): Remove call to Kill_Current_Values for subprogram entities, because this routine only does something for object entities. --y0ulUmNC+osPPQO6 Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="patch.diff" diff --git a/gcc/ada/sem_attr.adb b/gcc/ada/sem_attr.adb --- a/gcc/ada/sem_attr.adb +++ b/gcc/ada/sem_attr.adb @@ -504,7 +504,6 @@ package body Sem_Attr is begin if Is_Subprogram (Ent) then Set_Address_Taken (Ent); - Kill_Current_Values (Ent); -- An Address attribute is accepted when generated by the -- compiler for dispatching operation, and an error is --y0ulUmNC+osPPQO6--