diff options
author | Yannick Moy <moy@adacore.com> | 2024-04-26 17:02:52 +0200 |
---|---|---|
committer | Marc Poulhiès <poulhies@adacore.com> | 2024-06-14 09:34:51 +0200 |
commit | 02b7f6862723fc9f3c73a38dc9b7c518cfdf5069 (patch) | |
tree | 1570c2b044a9e97b9225f70d46c467dae252fba8 /gcc | |
parent | 55ceb87a72fee45a9a3e547a4e688f31d376a95a (diff) | |
download | gcc-02b7f6862723fc9f3c73a38dc9b7c518cfdf5069.zip gcc-02b7f6862723fc9f3c73a38dc9b7c518cfdf5069.tar.gz gcc-02b7f6862723fc9f3c73a38dc9b7c518cfdf5069.tar.bz2 |
ada: Skip subprogram body entities inside scopes
Entities of kind E_Subprogram_Body, used on bodies of subprograms for
which there is a separate declaration, have been added in the entities
linked from a scope in order to get the representation information on
their enclosed object and type declarations. Skip these entities in gigi.
gcc/ada/
* gcc-interface/trans.cc (elaborate_all_entities_for_package)
(process_freeze_entity): Skip entities of kind E_Subprogram_Body.
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ada/gcc-interface/trans.cc | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/gcc/ada/gcc-interface/trans.cc b/gcc/ada/gcc-interface/trans.cc index 5256095..e68fb3f 100644 --- a/gcc/ada/gcc-interface/trans.cc +++ b/gcc/ada/gcc-interface/trans.cc @@ -9321,6 +9321,10 @@ elaborate_all_entities_for_package (Entity_Id gnat_package) if (kind == E_Package_Body) continue; + /* Skip subprogram bodies. */ + if (kind == E_Subprogram_Body) + continue; + /* Skip limited views that point back to the main unit. */ if (IN (kind, Incomplete_Kind) && From_Limited_With (gnat_entity) @@ -9427,6 +9431,10 @@ process_freeze_entity (Node_Id gnat_node) if (Is_Subprogram (gnat_entity) && Present (Interface_Alias (gnat_entity))) return; + /* Skip subprogram bodies. */ + if (kind == E_Subprogram_Body) + return; + /* Check for an old definition if this isn't an object with address clause, since the saved GCC tree is the address expression in that case. */ gnu_old |