https://gcc.gnu.org/g:ad264cb6482808351fee154ace89dc91a8253f61
commit r15-1482-gad264cb6482808351fee154ace89dc91a8253f61 Author: Eric Botcazou <ebotca...@adacore.com> Date: Thu May 16 15:24:11 2024 +0200 ada: Remove Max_Entry_Queue_Depth pragma/aspect It was implemented apparently because a very early version of AI12-0164 that standardizes GNAT's Max_Queue_Length opted for the subtly different moniker, but later versions of the AI use Max_Entry_Queue_Length instead. gcc/ada/ * aspects.ads (Aspect_Id): Remove Aspect_Max_Entry_Queue_Depth. (global arrays): Remove entry for it. * exp_ch9.adb (Expand_N_Protected_Type_Declaration): Remove reference to pragma Max_Entry_Queue_Depth in comment. * par-prag.adb (Prag): Remove handling of Pragma_Max_Entry_Queue_Depth. * sem_ch13.adb (Analyze_Aspect_Specifications): Remove reference to aspect Max_Entry_Queue_Depth in comment. (Analyze_Aspect_Specifications): Remove processing of aspect Max_Entry_Queue_Depth. (Check_Aspect_At_Freeze_Point): Likewise. * sem_prag.ads (Find_Related_Declaration_Or_Body): Remove reference to pragma Max_Entry_Queue_Depth in comment. * sem_prag.adb (Analyze_Pragma): Remove processing of pragma Max_Entry_Queue_Depth. (Sig_Flags): Remove entry for Pragma_Max_Entry_Queue_Depth. * sem_util.adb (Get_Max_Queue_Length): Remove handling of pragma Max_Entry_Queue_Depth. (Has_Max_Queue_Length): Likewise. * snames.ads-tmpl (Name_Max_Entry_Queue_Depth): Move back from pragmas section to others section. (Pragma_Id): Remove Pragma_Max_Entry_Queue_Depth. Diff: --- gcc/ada/aspects.ads | 6 ------ gcc/ada/exp_ch9.adb | 3 +-- gcc/ada/par-prag.adb | 1 - gcc/ada/sem_ch13.adb | 15 --------------- gcc/ada/sem_prag.adb | 13 +------------ gcc/ada/sem_prag.ads | 1 - gcc/ada/sem_util.adb | 11 +++-------- gcc/ada/snames.ads-tmpl | 3 +-- 8 files changed, 6 insertions(+), 47 deletions(-) diff --git a/gcc/ada/aspects.ads b/gcc/ada/aspects.ads index 202d42193d13..140fb7c8fe12 100644 --- a/gcc/ada/aspects.ads +++ b/gcc/ada/aspects.ads @@ -114,7 +114,6 @@ package Aspects is Aspect_Linker_Section, -- GNAT Aspect_Local_Restrictions, -- GNAT Aspect_Machine_Radix, - Aspect_Max_Entry_Queue_Depth, -- GNAT Aspect_Max_Entry_Queue_Length, Aspect_Max_Queue_Length, -- GNAT Aspect_Object_Size, @@ -304,7 +303,6 @@ package Aspects is Aspect_Linker_Section => True, Aspect_Local_Restrictions => True, Aspect_Lock_Free => True, - Aspect_Max_Entry_Queue_Depth => True, Aspect_Max_Queue_Length => True, Aspect_No_Caching => True, Aspect_No_Elaboration_Code_All => True, @@ -450,7 +448,6 @@ package Aspects is Aspect_Linker_Section => Expression, Aspect_Local_Restrictions => Expression, Aspect_Machine_Radix => Expression, - Aspect_Max_Entry_Queue_Depth => Expression, Aspect_Max_Entry_Queue_Length => Expression, Aspect_Max_Queue_Length => Expression, Aspect_Object_Size => Expression, @@ -549,7 +546,6 @@ package Aspects is Aspect_Linker_Section => True, Aspect_Local_Restrictions => False, Aspect_Machine_Radix => True, - Aspect_Max_Entry_Queue_Depth => False, Aspect_Max_Entry_Queue_Length => False, Aspect_Max_Queue_Length => False, Aspect_Object_Size => True, @@ -732,7 +728,6 @@ package Aspects is Aspect_Lock_Free => Name_Lock_Free, Aspect_Local_Restrictions => Name_Local_Restrictions, Aspect_Machine_Radix => Name_Machine_Radix, - Aspect_Max_Entry_Queue_Depth => Name_Max_Entry_Queue_Depth, Aspect_Max_Entry_Queue_Length => Name_Max_Entry_Queue_Length, Aspect_Max_Queue_Length => Name_Max_Queue_Length, Aspect_No_Caching => Name_No_Caching, @@ -1046,7 +1041,6 @@ package Aspects is Aspect_Initial_Condition => Never_Delay, Aspect_Local_Restrictions => Never_Delay, Aspect_Initializes => Never_Delay, - Aspect_Max_Entry_Queue_Depth => Never_Delay, Aspect_Max_Entry_Queue_Length => Never_Delay, Aspect_Max_Queue_Length => Never_Delay, Aspect_No_Caching => Never_Delay, diff --git a/gcc/ada/exp_ch9.adb b/gcc/ada/exp_ch9.adb index 890bd038c5b9..a8c70598fa58 100644 --- a/gcc/ada/exp_ch9.adb +++ b/gcc/ada/exp_ch9.adb @@ -9376,8 +9376,7 @@ package body Exp_Ch9 is Need_Array : Boolean := False; begin - -- First check if there is any Max_Queue_Length, - -- Max_Entry_Queue_Length or Max_Entry_Queue_Depth pragma. + -- First check if there is any Max_[Entry_]Queue_Length pragma Item := First_Entity (Prot_Typ); while Present (Item) loop diff --git a/gcc/ada/par-prag.adb b/gcc/ada/par-prag.adb index 4d10a6e060aa..04eed22031a1 100644 --- a/gcc/ada/par-prag.adb +++ b/gcc/ada/par-prag.adb @@ -1484,7 +1484,6 @@ begin | Pragma_Machine_Attribute | Pragma_Main | Pragma_Main_Storage - | Pragma_Max_Entry_Queue_Depth | Pragma_Max_Entry_Queue_Length | Pragma_Max_Queue_Length | Pragma_Memory_Size diff --git a/gcc/ada/sem_ch13.adb b/gcc/ada/sem_ch13.adb index a35b67eddc82..f2f1b0cb8538 100644 --- a/gcc/ada/sem_ch13.adb +++ b/gcc/ada/sem_ch13.adb @@ -1449,7 +1449,6 @@ package body Sem_Ch13 is -- Global -- Initial_Condition -- Initializes - -- Max_Entry_Queue_Depth -- Max_Entry_Queue_Length -- Max_Queue_Length -- No_Caching @@ -3759,19 +3758,6 @@ package body Sem_Ch13 is goto Continue; end Initializes; - -- Max_Entry_Queue_Depth - - when Aspect_Max_Entry_Queue_Depth => - Aitem := Make_Aitem_Pragma - (Pragma_Argument_Associations => New_List ( - Make_Pragma_Argument_Association (Loc, - Expression => Relocate_Node (Expr))), - Pragma_Name => Name_Max_Entry_Queue_Depth); - - Decorate (Aspect, Aitem); - Insert_Pragma (Aitem); - goto Continue; - -- Max_Entry_Queue_Length when Aspect_Max_Entry_Queue_Length => @@ -11551,7 +11537,6 @@ package body Sem_Ch13 is | Aspect_Implicit_Dereference | Aspect_Initial_Condition | Aspect_Initializes - | Aspect_Max_Entry_Queue_Depth | Aspect_Max_Entry_Queue_Length | Aspect_Max_Queue_Length | Aspect_Obsolescent diff --git a/gcc/ada/sem_prag.adb b/gcc/ada/sem_prag.adb index d3b29089d772..772bf1b1abb9 100644 --- a/gcc/ada/sem_prag.adb +++ b/gcc/ada/sem_prag.adb @@ -20464,11 +20464,7 @@ package body Sem_Prag is -- pragma Max_Entry_Queue_Length (static_integer_EXPRESSION); - -- This processing is shared by Pragma_Max_Entry_Queue_Depth and - -- Pragma_Max_Queue_Length. - when Pragma_Max_Entry_Queue_Length - | Pragma_Max_Entry_Queue_Depth | Pragma_Max_Queue_Length => Max_Entry_Queue_Length : declare @@ -20478,9 +20474,7 @@ package body Sem_Prag is Val : Uint; begin - if Prag_Id = Pragma_Max_Entry_Queue_Depth - or else Prag_Id = Pragma_Max_Queue_Length - then + if Prag_Id = Pragma_Max_Queue_Length then GNAT_Pragma; end if; @@ -20516,10 +20510,6 @@ package body Sem_Prag is and then Prag_Id /= Pragma_Max_Entry_Queue_Length) or else - (Has_Rep_Pragma (Entry_Id, Name_Max_Entry_Queue_Depth) - and then - Prag_Id /= Pragma_Max_Entry_Queue_Depth) - or else (Has_Rep_Pragma (Entry_Id, Name_Max_Queue_Length) and then Prag_Id /= Pragma_Max_Queue_Length) @@ -32766,7 +32756,6 @@ package body Sem_Prag is Pragma_Machine_Attribute => -1, Pragma_Main => -1, Pragma_Main_Storage => -1, - Pragma_Max_Entry_Queue_Depth => 0, Pragma_Max_Entry_Queue_Length => 0, Pragma_Max_Queue_Length => 0, Pragma_Memory_Size => 0, diff --git a/gcc/ada/sem_prag.ads b/gcc/ada/sem_prag.ads index 42c38d8e1260..59220ea890c2 100644 --- a/gcc/ada/sem_prag.ads +++ b/gcc/ada/sem_prag.ads @@ -467,7 +467,6 @@ package Sem_Prag is -- Extensions_Visible -- Global -- Initializes - -- Max_Entry_Queue_Depth -- Max_Entry_Queue_Length -- Max_Queue_Length -- Post diff --git a/gcc/ada/sem_util.adb b/gcc/ada/sem_util.adb index 8479e8c4661c..7f5d70245dd9 100644 --- a/gcc/ada/sem_util.adb +++ b/gcc/ada/sem_util.adb @@ -10709,8 +10709,6 @@ package body Sem_Util is function Get_Max_Queue_Length (Id : Entity_Id) return Uint is pragma Assert (Is_Entry (Id)); PMQL : constant Entity_Id := Get_Pragma (Id, Pragma_Max_Queue_Length); - PMEQD : constant Entity_Id := - Get_Pragma (Id, Pragma_Max_Entry_Queue_Depth); PMEQL : constant Entity_Id := Get_Pragma (Id, Pragma_Max_Entry_Queue_Length); Max : Uint; @@ -10725,9 +10723,6 @@ package body Sem_Util is if Present (PMQL) then Max := Expr_Value (Expression (First (Pragma_Argument_Associations (PMQL)))); - elsif Present (PMEQD) then - Max := Expr_Value - (Expression (First (Pragma_Argument_Associations (PMEQD)))); elsif Present (PMEQL) then Max := Expr_Value (Expression (First (Pragma_Argument_Associations (PMEQL)))); @@ -12224,9 +12219,9 @@ package body Sem_Util is return Ekind (Id) = E_Entry and then - (Present (Get_Pragma (Id, Pragma_Max_Queue_Length)) or else - Present (Get_Pragma (Id, Pragma_Max_Entry_Queue_Depth)) or else - Present (Get_Pragma (Id, Pragma_Max_Entry_Queue_Length))); + (Present (Get_Pragma (Id, Pragma_Max_Queue_Length)) + or else + Present (Get_Pragma (Id, Pragma_Max_Entry_Queue_Length))); end Has_Max_Queue_Length; --------------------------------- diff --git a/gcc/ada/snames.ads-tmpl b/gcc/ada/snames.ads-tmpl index d2f724f86cab..ade933e0bbc7 100644 --- a/gcc/ada/snames.ads-tmpl +++ b/gcc/ada/snames.ads-tmpl @@ -613,7 +613,6 @@ package Snames is Name_Machine_Attribute : constant Name_Id := N + $; -- GNAT Name_Main : constant Name_Id := N + $; -- GNAT Name_Main_Storage : constant Name_Id := N + $; -- GNAT - Name_Max_Entry_Queue_Depth : constant Name_Id := N + $; -- GNAT Name_Max_Entry_Queue_Length : constant Name_Id := N + $; -- Ada 12 Name_Max_Queue_Length : constant Name_Id := N + $; -- GNAT Name_Memory_Size : constant Name_Id := N + $; -- Ada 83 @@ -829,6 +828,7 @@ package Snames is Name_Link_Name : constant Name_Id := N + $; Name_Low_Order_First : constant Name_Id := N + $; Name_Lowercase : constant Name_Id := N + $; + Name_Max_Entry_Queue_Depth : constant Name_Id := N + $; Name_Max_Size : constant Name_Id := N + $; Name_Mechanism : constant Name_Id := N + $; Name_Message : constant Name_Id := N + $; @@ -1900,7 +1900,6 @@ package Snames is Pragma_Machine_Attribute, Pragma_Main, Pragma_Main_Storage, - Pragma_Max_Entry_Queue_Depth, Pragma_Max_Entry_Queue_Length, Pragma_Max_Queue_Length, Pragma_Memory_Size,