r266992 - in /trunk/gcc/ada: ChangeLog sem_util...

pmderodat@gcc.gnu.org pmderodat@gcc.gnu.org
Tue Dec 11 11:10:00 GMT 2018


Author: pmderodat
Date: Tue Dec 11 11:10:22 2018
New Revision: 266992

URL: https://gcc.gnu.org/viewcvs?rev=266992&root=gcc&view=rev
Log:
[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.

Modified:
    trunk/gcc/ada/ChangeLog
    trunk/gcc/ada/sem_util.adb
    trunk/gcc/ada/sem_util.ads



More information about the Gcc-cvs mailing list