https://gcc.gnu.org/g:53346982061203267a3dbc3cfc494a3a4b1c1067
commit r17-1329-g53346982061203267a3dbc3cfc494a3a4b1c1067 Author: Eric Botcazou <[email protected]> Date: Tue May 19 01:16:03 2026 +0200 ada: Rename Apply_Accessibility_Check_For_Parameter The routine is also used for Ada 2012's stand-alone objects of an anonymous access type, that is to say not only for access parameters. It is invoked on an explicit or implicit conversion of the object to another access type. gcc/ada/ChangeLog: * accessibility.ads (Apply_Accessibility_Check_For_Parameter): Rename to... (Apply_Accessibility_Check_For_Conversion): ...this. * accessibility.adb (Apply_Accessibility_Check_For_Parameter): Rename to... (Apply_Accessibility_Check_For_Conversion): ...this. * exp_attr.adb (Expand_N_Attribute_Reference) <Attribute_Access>: Adjust to above renaming. * exp_ch4.adb (Expand_N_Type_Conversion): Likewise. * exp_ch6.adb (Expand_Actuals): Likewise. Diff: --- gcc/ada/accessibility.adb | 10 +++++----- gcc/ada/accessibility.ads | 10 +++++----- gcc/ada/exp_attr.adb | 2 +- gcc/ada/exp_ch4.adb | 2 +- gcc/ada/exp_ch6.adb | 2 +- 5 files changed, 13 insertions(+), 13 deletions(-) diff --git a/gcc/ada/accessibility.adb b/gcc/ada/accessibility.adb index a1472fab9198..2911fba80fcc 100644 --- a/gcc/ada/accessibility.adb +++ b/gcc/ada/accessibility.adb @@ -1546,11 +1546,11 @@ package body Accessibility is end loop; end Apply_Accessibility_Check_For_Discriminated_Return; - --------------------------------------------- - -- Apply_Accessibility_Check_For_Parameter -- - --------------------------------------------- + ---------------------------------------------- + -- Apply_Accessibility_Check_For_Conversion -- + ---------------------------------------------- - procedure Apply_Accessibility_Check_For_Parameter + procedure Apply_Accessibility_Check_For_Conversion (N : Node_Id; Typ : Entity_Id; Insert_Node : Node_Id) @@ -1655,7 +1655,7 @@ package body Accessibility is Error_Msg_N ("\Program_Error [<<", N); end if; end if; - end Apply_Accessibility_Check_For_Parameter; + end Apply_Accessibility_Check_For_Conversion; ------------------------------------------ -- Apply_Accessibility_Check_For_Return -- diff --git a/gcc/ada/accessibility.ads b/gcc/ada/accessibility.ads index cfec56d3507a..8cdb62359fee 100644 --- a/gcc/ada/accessibility.ads +++ b/gcc/ada/accessibility.ads @@ -102,14 +102,14 @@ package Accessibility is -- case seems to be an actual gap in the language rules that needs to -- be fixed by the ARG. ??? - procedure Apply_Accessibility_Check_For_Parameter + procedure Apply_Accessibility_Check_For_Conversion (N : Node_Id; Typ : Entity_Id; Insert_Node : Node_Id); - -- Given a name N denoting an access parameter, insert a run-time check - -- that the accessibility level of the object denoted by the parameter - -- is not deeper than the level of the type Typ. Insert_Node indicates - -- the node where the check should be inserted. + -- Given a name N denoting an access parameter or an SAOOAAAT, insert a + -- run-time check that the accessibility level of the anonymous access + -- type of the object is not deeper than the level of Typ. Insert_Node + -- indicates the node where the check should be inserted. procedure Apply_Accessibility_Check_For_Return (Exp : Node_Id; diff --git a/gcc/ada/exp_attr.adb b/gcc/ada/exp_attr.adb index e5bd95d5a525..1cd7a3259374 100644 --- a/gcc/ada/exp_attr.adb +++ b/gcc/ada/exp_attr.adb @@ -3064,7 +3064,7 @@ package body Exp_Attr is (Entity (Prefix (Enc_Object)))) and then not No_Dynamic_Accessibility_Checks_Enabled (Enc_Object) then - Apply_Accessibility_Check_For_Parameter + Apply_Accessibility_Check_For_Conversion (Prefix (Enc_Object), Typ, N); -- Ada 2005 (AI-251): If the designated type is an interface we diff --git a/gcc/ada/exp_ch4.adb b/gcc/ada/exp_ch4.adb index 41448c9df617..e139c89e2a3f 100644 --- a/gcc/ada/exp_ch4.adb +++ b/gcc/ada/exp_ch4.adb @@ -12338,7 +12338,7 @@ package body Exp_Ch4 is null; else - Apply_Accessibility_Check_For_Parameter + Apply_Accessibility_Check_For_Conversion (Operand, Target_Type, Insert_Node => Operand); end if; diff --git a/gcc/ada/exp_ch6.adb b/gcc/ada/exp_ch6.adb index a31dd269d92e..09156d987022 100644 --- a/gcc/ada/exp_ch6.adb +++ b/gcc/ada/exp_ch6.adb @@ -1811,7 +1811,7 @@ package body Exp_Ch6 is pragma Assert (Ada_Version >= Ada_2012); - Apply_Accessibility_Check_For_Parameter (Lhs, E_Formal, N); + Apply_Accessibility_Check_For_Conversion (Lhs, E_Formal, N); Append_To (Post_Call, Make_Assignment_Statement (Loc,
