public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
From: Pierre-Marie de Rodat <pmderodat@gcc.gnu.org>
To: gcc-cvs@gcc.gnu.org
Subject: [gcc r13-634] [Ada] Remove dead code for scope entity having E_Subprogram_Body kind
Date: Thu, 19 May 2022 14:06:18 +0000 (GMT)	[thread overview]
Message-ID: <20220519140618.A2F40383D80D@sourceware.org> (raw)

https://gcc.gnu.org/g:20c932f30b5fb6110686378ad412bda2a5c6537e

commit r13-634-g20c932f30b5fb6110686378ad412bda2a5c6537e
Author: Piotr Trojanek <trojanek@adacore.com>
Date:   Thu Feb 3 15:11:26 2022 +0100

    [Ada] Remove dead code for scope entity having E_Subprogram_Body kind
    
    In GNAT AST the Scope field always points to the semantic scope (e.g.
    subprogram) and never to syntactic scope (e.g. subprogram body).
    
    Cleanup related to handling of circular access-to-record types.
    
    gcc/ada/
    
            * gcc-interface/decl.cc (gnat_to_gnu_entity): Remove dead code
            which expected Scope to return E_Subprogram_Body entity.

Diff:
---
 gcc/ada/gcc-interface/decl.cc | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/gcc/ada/gcc-interface/decl.cc b/gcc/ada/gcc-interface/decl.cc
index 28e1ab7ce81..aae1ef10509 100644
--- a/gcc/ada/gcc-interface/decl.cc
+++ b/gcc/ada/gcc-interface/decl.cc
@@ -363,10 +363,6 @@ gnat_to_gnu_entity (Entity_Id gnat_entity, tree gnu_expr, bool definition)
 	  if (Is_Type (gnat_temp))
 	    gnat_temp = Underlying_Type (gnat_temp);
 
-	  if (Ekind (gnat_temp) == E_Subprogram_Body)
-	    gnat_temp
-	      = Corresponding_Spec (Parent (Declaration_Node (gnat_temp)));
-
 	  if (Is_Subprogram (gnat_temp)
 	      && Present (Protected_Body_Subprogram (gnat_temp)))
 	    gnat_temp = Protected_Body_Subprogram (gnat_temp);


                 reply	other threads:[~2022-05-19 14:06 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220519140618.A2F40383D80D@sourceware.org \
    --to=pmderodat@gcc.gnu.org \
    --cc=gcc-cvs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).