diff options
author | Piotr Trojanek <trojanek@adacore.com> | 2022-02-03 15:11:26 +0100 |
---|---|---|
committer | Pierre-Marie de Rodat <derodat@adacore.com> | 2022-05-19 14:05:27 +0000 |
commit | 20c932f30b5fb6110686378ad412bda2a5c6537e (patch) | |
tree | 7c2e6a69f1069d8d589bc85fea9c077f769a738f /gcc/ada/gcc-interface/decl.cc | |
parent | 16e02662c092c6e3087628ef0030e7daa2f71485 (diff) | |
download | gcc-20c932f30b5fb6110686378ad412bda2a5c6537e.zip gcc-20c932f30b5fb6110686378ad412bda2a5c6537e.tar.gz gcc-20c932f30b5fb6110686378ad412bda2a5c6537e.tar.bz2 |
[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.
Diffstat (limited to 'gcc/ada/gcc-interface/decl.cc')
-rw-r--r-- | gcc/ada/gcc-interface/decl.cc | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/gcc/ada/gcc-interface/decl.cc b/gcc/ada/gcc-interface/decl.cc index 28e1ab7..aae1ef1 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); |