]> git.ipfire.org Git - thirdparty/gcc.git/commit
[Ada] Fix internal error on subprogram instantiation with -gnatzc
authorpmderodat <pmderodat@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 19 Aug 2019 08:36:07 +0000 (08:36 +0000)
committerpmderodat <pmderodat@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 19 Aug 2019 08:36:07 +0000 (08:36 +0000)
commit52fd9316d15f99c3c26c496f9894aa18fce7df43
tree77ca99a7ab530701448747d6dd1fc47b26f99603
parentdea591de06dd1074833dbd4d487862e77eb5f4c7
[Ada] Fix internal error on subprogram instantiation with -gnatzc

This fixes a fallout of the recent change keeping the
Is_Generic_Instance flag on the wrapper package built for the
instantiation of a generic subprogram.

There is no need to visit the Instance_Spec of an
N_Subprogram_Instantiation node anymore because the regular processing
for an N_Package_Declaration node now does the job for instantiations of
generic subprograms.

The following subprogram must compile again quietly with -gnatzc:

with Gen_Proc;

package RCI is
   pragma Remote_Call_Interface;

   procedure Inst_Proc is new Gen_Proc;

   procedure P (S : String);
end RCI;

generic
procedure Gen_Proc (S : String);
pragma Remote_Call_Interface (Gen_Proc);

with Ada.Text_IO; use Ada.Text_IO;
procedure Gen_Proc (S : String) is
begin
   Put_Line ("Gen_Proc called: " & S);
end Gen_Proc;

2019-08-19  Eric Botcazou  <ebotcazou@adacore.com>

gcc/ada/

* exp_dist.adb (Build_Package_Stubs): Do not specifically visit
the declarations of an N_Subprogram_Instantiation node.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@274647 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/ada/ChangeLog
gcc/ada/exp_dist.adb