From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 7871) id 93F243858281; Thu, 5 Jan 2023 14:39:21 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 93F243858281 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1672929561; bh=lhZ1FRl3aR3XgeeB9GkOzII/GbE9O63K8pXnuvDY++M=; h=From:To:Subject:Date:From; b=kvSGN2lx9X14zHYPyYh+th+UW3XoWzOEbH82gTMoI26xE2xy5gQ2dBV0F0XmqgF92 SNCdzThgCsxJ7bsO7bYD5nHsXJ5bH0avsEhDhkK8WUEVpKAhwrKxZs3c9n9k0/zvqe d9lnFAFiB9wr0epERhc+2nE7Dshki9XJ3nd0ayLc= MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="utf-8" From: Marc Poulhi?s To: gcc-cvs@gcc.gnu.org Subject: [gcc r13-5027] ada: Remove unhelpful special case for renamed bodies in GNATprove mode X-Act-Checkin: gcc X-Git-Author: Piotr Trojanek X-Git-Refname: refs/heads/master X-Git-Oldrev: 07facb98ed0db8771fd36e6c73921177c11b18ea X-Git-Newrev: 6147feb54c7473033c5e9344fdd834c417820af4 Message-Id: <20230105143921.93F243858281@sourceware.org> Date: Thu, 5 Jan 2023 14:39:21 +0000 (GMT) List-Id: https://gcc.gnu.org/g:6147feb54c7473033c5e9344fdd834c417820af4 commit r13-5027-g6147feb54c7473033c5e9344fdd834c417820af4 Author: Piotr Trojanek Date: Tue Dec 20 16:27:30 2022 +0100 ada: Remove unhelpful special case for renamed bodies in GNATprove mode This patch reverts a special-case related to inlining of renamed bodies in GNATprove mode. Its idea was that inlining is decided in routine Cannot_Inline, which is called much later. This didn't quite work, because in the meantime the renamed body was prepared to inlining in Build_Body_To_Inline, which was not designed to handle renamed bodies. gcc/ada/ * freeze.adb (Build_Renamed_Body): Revert a special case for GNATprove; remove unnecessary initialization of a local variable. Diff: --- gcc/ada/freeze.adb | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/gcc/ada/freeze.adb b/gcc/ada/freeze.adb index 97a25d10835..a3ab685f5fc 100644 --- a/gcc/ada/freeze.adb +++ b/gcc/ada/freeze.adb @@ -398,7 +398,7 @@ package body Freeze is Nam : constant Node_Id := Name (N); Old_S : Entity_Id; Spec : constant Node_Id := New_Copy_Tree (Specification (Decl)); - Actuals : List_Id := No_List; + Actuals : List_Id; Call_Node : Node_Id; Call_Name : Node_Id; Body_Node : Node_Id; @@ -477,14 +477,11 @@ package body Freeze is -- calls to the renamed entity. The body must be generated in any case -- for calls that may appear elsewhere. This is not done in the case -- where the subprogram is an instantiation because the actual proper - -- body has not been built yet. This is also not done in GNATprove mode - -- as we need to check other conditions for creating a body to inline - -- in that case, which are controlled in Analyze_Subprogram_Body_Helper. + -- body has not been built yet. if Ekind (Old_S) in E_Function | E_Procedure and then Nkind (Decl) = N_Subprogram_Declaration and then not Is_Generic_Instance (Old_S) - and then not GNATprove_Mode then Set_Body_To_Inline (Decl, Old_S); end if;