diff options
Diffstat (limited to 'gcc/ada/exp_ch5.adb')
-rw-r--r-- | gcc/ada/exp_ch5.adb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/gcc/ada/exp_ch5.adb b/gcc/ada/exp_ch5.adb index 2c2ddb0a980..f53ac1f57cb 100644 --- a/gcc/ada/exp_ch5.adb +++ b/gcc/ada/exp_ch5.adb @@ -4247,9 +4247,11 @@ package body Exp_Ch5 is Reason => PE_Accessibility_Check_Failed)); end; - -- AI05-0073 : if function has a controlling access result, check that + -- AI05-0073: If function has a controlling access result, check that -- the tag of the return value matches the designated type. + -- The "or else True" needs commenting here ??? + elsif Ekind (R_Type) = E_Anonymous_Access_Type and then Has_Controlling_Result (Scope_Id) and then (Ada_Version >= Ada_12 or else True) |