package pak is
procedure p1;
procedure p1(x: integer);
pragma export(ada, p1);
end pak;
with text_io; use text_io;
package body pak is
procedure p1 is
begin
put_line("passed");
end;
procedure p1(x: integer) is
begin
put_line("failed: wrong p1 called");
end;
end pak;
with pak;
procedure Test_77 is
procedure p1;
pragma import(ada, p1);
begin
p1;
end Test_77;
The program outputs:
failed: wrong p1 called
The procedure that was exported is reimported; this is the wrong one!
found 247020 4.3.2-2 found 247569 4.3.2-2 found 247571 4.3.2-2 thanks
found 247571 4.4.1-1 thanks