diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index f0595781118..e1342f48754 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,8 @@ +2019-08-19 Eric Botcazou + + * exp_dist.adb (Build_Package_Stubs): Do not specifically visit + the declarations of an N_Subprogram_Instantiation node. + 2019-08-19 Bob Duff * doc/gnat_ugn/gnat_utility_programs.rst: Document missing diff --git a/gcc/ada/exp_dist.adb b/gcc/ada/exp_dist.adb index 13d45ff29ba..4f13d9cedaf 100644 --- a/gcc/ada/exp_dist.adb +++ b/gcc/ada/exp_dist.adb @@ -963,10 +963,8 @@ package body Exp_Dist is when N_Package_Declaration => -- Case of a nested package or package instantiation coming - -- from source. Note that the anonymous wrapper package for - -- subprogram instances is not flagged Is_Generic_Instance at - -- this point, so there is a distinct circuit to handle them - -- (see case N_Subprogram_Instantiation below). + -- from source, including the wrapper package for an instance + -- of a generic subprogram. declare Pkg_Ent : constant Entity_Id := @@ -982,16 +980,6 @@ package body Exp_Dist is end if; end; - when N_Subprogram_Instantiation => - - -- The subprogram declaration for an instance of a generic - -- subprogram is wrapped in a package that does not come from - -- source, so we need to explicitly traverse it here. - - if Comes_From_Source (Decl) then - Visit_Nested_Pkg (Instance_Spec (Decl)); - end if; - when others => null; end case;