sem_cat.adb
78.8 KB
-
[Ada] Spurious error on early call region of tagged type · 7a500fd7
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. From-SVN: r260467
Hristian Kirtchev committed