From bcb8c3bba756feb252340757e0944956684b7cfb Mon Sep 17 00:00:00 2001 From: Justin Squirek Date: Mon, 29 Mar 2021 08:46:02 -0400 Subject: [Ada] INOX: prototype alternative accessibility model gcc/ada/ * checks.adb (Accessibility_Checks_Suppressed): Add check against restriction No_Dynamic_Accessibility_Checks. (Apply_Accessibility_Check): Add assertion to check restriction No_Dynamic_Accessibility_Checks is not active. * debug.adb: Add documentation for new debugging switch to control which accessibility model gets employed under restriction No_Dynamic_Accessibility_Checks. * exp_attr.adb (Expand_N_Attribute_Reference): Disable dynamic accessibility check generation when No_Dynamic_Accessibility_Checks is active. * exp_ch4.adb (Apply_Accessibility_Check): Skip check generation when restriction No_Dynamic_Accessibility_Checks is active. (Expand_N_Allocator): Disable dynamic accessibility checks when No_Dynamic_Accessibility_Checks is active. (Expand_N_In): Disable dynamic accessibility checks when No_Dynamic_Accessibility_Checks is active. (Expand_N_Type_Conversion): Disable dynamic accessibility checks when No_Dynamic_Accessibility_Checks is active. * exp_ch5.adb (Expand_N_Assignment_Statement): Disable alternative accessibility model calculations when computing a dynamic level for a SAOAAT. * exp_ch6.adb (Add_Call_By_Copy_Code): Disable dynamic accessibility check generation when No_Dynamic_Accessibility_Checks is active. (Expand_Branch): Disable alternative accessibility model calculations. (Expand_Call_Helper): Disable alternative accessibility model calculations. * restrict.adb, restrict.ads: Add new restriction No_Dynamic_Accessibility_Checks. (No_Dynamic_Accessibility_Checks_Enabled): Created to test when experimental features (which are generally incompatible with standard Ada) can be enabled. * sem_attr.adb (Safe_Value_Conversions): Add handling of new accessibility model under the restriction No_Dynamic_Accessibility_Checks. * sem_prag.adb (Process_Restrictions_Or_Restriction_Warnings): Disallow new restriction No_Dynamic_Accessibility_Checks from being exclusively specified within a body or subunit without being present in a specification. * sem_res.adb (Check_Fully_Declared_Prefix): Minor comment fixup. (Valid_Conversion): Omit implicit conversion checks on anonymous access types and perform static checking instead when No_Dynamic_Accessibility_Checks is active. * sem_util.adb, sem_util.ads (Accessibility_Level): Add special handling of anonymous access objects, formal parameters, anonymous access components, and function return objects. (Deepest_Type_Access_Level): When No_Dynamic_Accessibility_Checks is active employ an alternative model. Add paramter Allow_Alt_Model to override the new behavior in certain cases. (Type_Access_Level): When No_Dynamic_Accessibility_Checks is active employ an alternative model. Add parameter Allow_Alt_Model to override the new behavior in certain cases. (Typ_Access_Level): Created within Accessibility_Level for convenience. * libgnat/s-rident.ads, snames.ads-tmpl: Add handing for No_Dynamic_Accessibility_Checks. --- gcc/ada/debug.adb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gcc/ada/debug.adb') diff --git a/gcc/ada/debug.adb b/gcc/ada/debug.adb index 978f333..5a4d1d3 100644 --- a/gcc/ada/debug.adb +++ b/gcc/ada/debug.adb @@ -140,7 +140,7 @@ package body Debug is -- d.Z Do not enable expansion in configurable run-time mode -- d_a Stop elaboration checks on accept or select statement - -- d_b + -- d_b Use compatibility model under No_Dynamic_Accessibility_Checks -- d_c CUDA compilation : compile for the host -- d_d -- d_e Ignore entry calls and requeue statements for elaboration -- cgit v1.1