r260467 - in /trunk/gcc/ada: ChangeLog exp_cg.a...

pmderodat@gcc.gnu.org pmderodat@gcc.gnu.org
Mon May 21 14:52:00 GMT 2018


Author: pmderodat
Date: Mon May 21 14:52:11 2018
New Revision: 260467

URL: https://gcc.gnu.org/viewcvs?rev=260467&root=gcc&view=rev
Log:
[Ada] Spurious error on early call region of tagged type

This patch corrects the part of the access-before-elaboration mechanism which
ensures that the freeze node of a tagged type is within the early call region
of all its overriding bodies to ignore predefined primitives.

------------
-- Source --
------------

--  pack.ads

package Pack with SPARK_Mode is
   type Parent_Typ is tagged null record;
   procedure Prim (Obj : Parent_Typ);

   type Deriv_Typ is new Parent_Typ with private;
   overriding procedure Prim (Obj : Deriv_Typ);

private
   type Deriv_Typ is new Parent_Typ with null record;
end Pack;

-----------------
-- Compilation --
-----------------

$ gcc -c pack.ads

2018-05-21  Hristian Kirtchev  <kirtchev@adacore.com>

gcc/ada/

	* exp_cg.adb: Remove with and use clause for Exp_Disp.
	* exp_ch9.adb: Remove with and use clause for Exp_Disp.
	* exp_disp.adb (Is_Predefined_Dispatching_Operation): Moved to Sem_Util.
	(Is_Predefined_Interface_Primitive): Moved to Sem_Util.
	(Is_Predefined_Internal_Operation): Moved to Sem_Util.
	* exp_disp.ads (Is_Predefined_Dispatching_Operation): Moved to Sem_Util.
	(Is_Predefined_Interface_Primitive): Moved to Sem_Util.
	(Is_Predefined_Internal_Operation): Moved to Sem_Util.
	* exp_dist.adb: Remove with and use clause for Exp_Disp.
	* freeze.adb: Remove with and use clause for Exp_Disp.
	* sem_cat.adb: Remove with and use clause for Exp_Disp.
	* sem_ch6.adb: Remove with and use clause for Exp_Disp.
	* sem_ch12.adb: Remove with and use clause for Exp_Disp.
	* sem_elab.adb (Check_Overriding_Primitive): Do not process predefined
	primitives.
	* sem_util.adb: Remove with and use clause for Exp_Disp.
	(Is_Predefined_Dispatching_Operation): Moved from Exp_Disp.
	(Is_Predefined_Interface_Primitive): Moved from Exp_Disp.
	(Is_Predefined_Internal_Operation): Moved from Exp_Disp.
	* sem_util.ads (Is_Predefined_Dispatching_Operation): Moved from
	Exp_Disp.
	(Is_Predefined_Interface_Primitive): Moved from Exp_Disp.
	(Is_Predefined_Internal_Operation): Moved from Exp_Disp.

Modified:
    trunk/gcc/ada/ChangeLog
    trunk/gcc/ada/exp_cg.adb
    trunk/gcc/ada/exp_ch9.adb
    trunk/gcc/ada/exp_disp.adb
    trunk/gcc/ada/exp_disp.ads
    trunk/gcc/ada/exp_dist.adb
    trunk/gcc/ada/freeze.adb
    trunk/gcc/ada/sem_cat.adb
    trunk/gcc/ada/sem_ch12.adb
    trunk/gcc/ada/sem_ch6.adb
    trunk/gcc/ada/sem_elab.adb
    trunk/gcc/ada/sem_util.adb
    trunk/gcc/ada/sem_util.ads



More information about the Gcc-cvs mailing list