[Ada] Fix internal error on subprogram instantiation with -gnatzc
Pierre-Marie de Rodat
derodat@adacore.com
Mon Aug 19 08:39:00 GMT 2019
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;
Tested on x86_64-pc-linux-gnu, committed on trunk
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.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch.diff
Type: text/x-diff
Size: 1298 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20190819/e8e5b79e/attachment.bin>
More information about the Gcc-patches
mailing list