aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/exp_ch7.adb
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/ada/exp_ch7.adb')
-rw-r--r--gcc/ada/exp_ch7.adb6
1 files changed, 5 insertions, 1 deletions
diff --git a/gcc/ada/exp_ch7.adb b/gcc/ada/exp_ch7.adb
index 7a84576..99142a5 100644
--- a/gcc/ada/exp_ch7.adb
+++ b/gcc/ada/exp_ch7.adb
@@ -2526,9 +2526,12 @@ package body Exp_Ch7 is
then
Processing_Actions (Decl);
- -- Simple protected objects which use type System.Tasking.
+ -- Simple protected objects which use the type System.Tasking.
-- Protected_Objects.Protection to manage their locks should
-- be treated as controlled since they require manual cleanup.
+ -- but not for restricted run-time libraries (Ravenscar), see
+ -- also Cleanup_Protected_Object.
+
-- The only exception is illustrated in the following example:
-- package Pkg is
@@ -2561,6 +2564,7 @@ package body Exp_Ch7 is
elsif Ekind (Obj_Id) = E_Variable
and then not In_Library_Level_Package_Body (Obj_Id)
and then Has_Simple_Protected_Object (Obj_Typ)
+ and then not Restricted_Profile
then
Processing_Actions (Decl, Is_Protected => True);
end if;