[Ada] Stubs that complete generic subprogram do have a "prior declaration"
The intuition behind the Is_Subprogram_Stub_Without_Prior_Declaration
utility routine is to detect stubs that act as subprogram declarations
and False on stubs that act as completions. This behaviour is now fixed
for stubs that correspond to generic subprogram declarations.
This patch affects a routine that is only used in GNATprove, so no
frontend test provided. An example where the result changed from True to
False is:
-----------
-- p.ads --
-----------
package P is
generic
procedure Proc;
end P;
-----------
-- p.adb --
-----------
package body P is
procedure Proc is separate; -- now we return False for this stub
end P;
----------------
-- p-proc.adb --
----------------
separate (P)
procedure Proc is
begin
null;
end;
2018-12-11 Piotr Trojanek <trojanek@adacore.com>
gcc/ada/
* sem_util.adb (Is_Subprogram_Stub_Without_Prior_Declaration):
Return False on stubs that complete a generic subprogram.
* sem_util.ads: Update corresponding comment.
From-SVN: r266992