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.
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);