From: Piotr Trojanek <troja...@adacore.com> GNATprove newer implemented support for abstract states with aspect Relaxed_Initialization, so the frontend support is now deconstructed.
gcc/ada/ * einfo-utils.adb (Is_Relaxed_Initialization_State): Remove. * einfo-utils.ads (Is_Relaxed_Initialization_State): Remove. * einfo.ads: Remove description of removed aspect. * fe.h (Is_Relaxed_Initialization_State): Remove. * sem_prag.adb (Analyze_Abstract_State): Remove support for Relaxed_Initialization. * sem_util.adb (Has_Relaxed_Initialization): Likewise. * sem_util.ads (Has_Relaxed_Initialization): Likewise. Tested on x86_64-pc-linux-gnu, committed on master. --- gcc/ada/einfo-utils.adb | 14 -------------- gcc/ada/einfo-utils.ads | 1 - gcc/ada/einfo.ads | 5 ----- gcc/ada/fe.h | 3 --- gcc/ada/sem_prag.adb | 25 +++++++++---------------- gcc/ada/sem_util.adb | 5 ----- gcc/ada/sem_util.ads | 6 +++--- 7 files changed, 12 insertions(+), 47 deletions(-) diff --git a/gcc/ada/einfo-utils.adb b/gcc/ada/einfo-utils.adb index 00799eb9bee..438868ac757 100644 --- a/gcc/ada/einfo-utils.adb +++ b/gcc/ada/einfo-utils.adb @@ -1649,20 +1649,6 @@ package body Einfo.Utils is and then Is_Protected_Type (Corresponding_Concurrent_Type (Id)); end Is_Protected_Record_Type; - ------------------------------------- - -- Is_Relaxed_Initialization_State -- - ------------------------------------- - - function Is_Relaxed_Initialization_State (Id : E) return B is - begin - -- To qualify, the abstract state must appear with simple option - -- "Relaxed_Initialization" (SPARK RM 6.10). - - return - Ekind (Id) = E_Abstract_State - and then Has_Option (Id, Name_Relaxed_Initialization); - end Is_Relaxed_Initialization_State; - -------------------------------- -- Is_Standard_Character_Type -- -------------------------------- diff --git a/gcc/ada/einfo-utils.ads b/gcc/ada/einfo-utils.ads index 701d8ce59fb..d87a3e34f49 100644 --- a/gcc/ada/einfo-utils.ads +++ b/gcc/ada/einfo-utils.ads @@ -201,7 +201,6 @@ package Einfo.Utils is function Is_Protected_Component (Id : E) return B with Inline; function Is_Protected_Interface (Id : E) return B; function Is_Protected_Record_Type (Id : E) return B with Inline; - function Is_Relaxed_Initialization_State (Id : E) return B; function Is_Standard_Character_Type (Id : E) return B; function Is_Standard_String_Type (Id : E) return B; function Is_String_Type (Id : E) return B with Inline; diff --git a/gcc/ada/einfo.ads b/gcc/ada/einfo.ads index 6f563d5e62c..e3bfdb3507d 100644 --- a/gcc/ada/einfo.ads +++ b/gcc/ada/einfo.ads @@ -3219,10 +3219,6 @@ package Einfo is -- Applies to all entities, true for record types and subtypes, -- includes class-wide types and subtypes (which are also records). --- Is_Relaxed_Initialization_State (synthesized) --- Applies to all entities, true for abstract states that are subject to --- option Relaxed_Initialization. - -- Is_Remote_Call_Interface -- Defined in all entities. Set in E_Package and E_Generic_Package -- entities to which a pragma Remote_Call_Interface is applied, and @@ -5129,7 +5125,6 @@ package Einfo is -- Has_Null_Visible_Refinement (synth) -- Is_External_State (synth) -- Is_Null_State (synth) - -- Is_Relaxed_Initialization_State (synth) -- Is_Synchronized_State (synth) -- Partial_Refinement_Constituents (synth) diff --git a/gcc/ada/fe.h b/gcc/ada/fe.h index 6aaa3fdc4d3..397045ea583 100644 --- a/gcc/ada/fe.h +++ b/gcc/ada/fe.h @@ -501,9 +501,6 @@ B Is_Protected_Interface (E Id); #define Is_Protected_Record_Type einfo__utils__is_protected_record_type B Is_Protected_Record_Type (E Id); -#define Is_Relaxed_Initialization_State einfo__utils__is_relaxed_initialization_state -B Is_Relaxed_Initialization_State (E Id); - #define Is_Standard_Character_Type einfo__utils__is_standard_character_type B Is_Standard_Character_Type (E Id); diff --git a/gcc/ada/sem_prag.adb b/gcc/ada/sem_prag.adb index 39005aaea05..299e388167f 100644 --- a/gcc/ada/sem_prag.adb +++ b/gcc/ada/sem_prag.adb @@ -12181,16 +12181,15 @@ package body Sem_Prag is is -- Flags used to verify the consistency of options - AR_Seen : Boolean := False; - AW_Seen : Boolean := False; - ER_Seen : Boolean := False; - EW_Seen : Boolean := False; - External_Seen : Boolean := False; - Ghost_Seen : Boolean := False; - Others_Seen : Boolean := False; - Part_Of_Seen : Boolean := False; - Relaxed_Initialization_Seen : Boolean := False; - Synchronous_Seen : Boolean := False; + AR_Seen : Boolean := False; + AW_Seen : Boolean := False; + ER_Seen : Boolean := False; + EW_Seen : Boolean := False; + External_Seen : Boolean := False; + Ghost_Seen : Boolean := False; + Others_Seen : Boolean := False; + Part_Of_Seen : Boolean := False; + Synchronous_Seen : Boolean := False; -- Flags used to store the static value of all external states' -- expressions. @@ -12672,12 +12671,6 @@ package body Sem_Prag is Check_Duplicate_Option (Opt, Synchronous_Seen); Check_Ghost_Synchronous; - -- Relaxed_Initialization - - elsif Chars (Opt) = Name_Relaxed_Initialization then - Check_Duplicate_Option - (Opt, Relaxed_Initialization_Seen); - -- Option Part_Of without an encapsulating state is -- illegal (SPARK RM 7.1.4(8)). diff --git a/gcc/ada/sem_util.adb b/gcc/ada/sem_util.adb index ef6f3823b1b..c47904f168c 100644 --- a/gcc/ada/sem_util.adb +++ b/gcc/ada/sem_util.adb @@ -13106,11 +13106,6 @@ package body Sem_Util is -- but now without any syntactic checks. case Ekind (E) is - -- Abstract states have option Relaxed_Initialization - - when E_Abstract_State => - return Is_Relaxed_Initialization_State (E); - -- Constants have this aspect attached directly; for deferred -- constants, the aspect is attached to the partial view. diff --git a/gcc/ada/sem_util.ads b/gcc/ada/sem_util.ads index 384b9a3dac8..db02d39fdee 100644 --- a/gcc/ada/sem_util.ads +++ b/gcc/ada/sem_util.ads @@ -1516,9 +1516,9 @@ package Sem_Util is function Has_Relaxed_Initialization (E : Entity_Id) return Boolean; -- Returns True iff entity E is subject to the Relaxed_Initialization - -- aspect. Entity E can be either type, variable, constant, subprogram, - -- entry or an abstract state. For private types and deferred constants - -- E should be the private view, because aspect can only be attached there. + -- aspect. Entity E can be either type, variable, constant, subprogram or + -- entry. For private types and deferred constants E should be the private + -- view, because aspect can only be attached there. function Has_Signed_Zeros (E : Entity_Id) return Boolean; -- Determines if the floating-point type E supports signed zeros. -- 2.43.2