]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
ada: Accept parameters of enclosing subprograms in exceptional cases
authorPiotr Trojanek <trojanek@adacore.com>
Tue, 4 Apr 2023 11:38:14 +0000 (13:38 +0200)
committerMarc Poulhiès <poulhies@adacore.com>
Mon, 29 May 2023 08:23:20 +0000 (10:23 +0200)
Rules about parameters of modes OUT and IN OUT in aspect
Exceptional_Cases only apply to the parameters of the current
subprogram.

gcc/ada/

* sem_res.adb (Resolve_Entity_Name): Refine rules for Exceptional_Cases.

gcc/ada/sem_res.adb

index 6d4bef8d38e3d8409f28771b9656fe97b31db337..066072a6afec1778c51e2326ea9ae883ffccb9ff 100644 (file)
@@ -8122,6 +8122,7 @@ package body Sem_Res is
             --  data from the object.
 
             if Ekind (E) in E_Out_Parameter | E_In_Out_Parameter
+              and then Scope (E) = Current_Scope
               and then Within_Exceptional_Cases_Consequence (N)
               and then not In_Attribute_Old (N)
               and then not (Nkind (Parent (N)) = N_Attribute_Reference