From: Piotr Trojanek Date: Thu, 7 Jan 2021 10:50:51 +0000 (+0100) Subject: [Ada] Simplify iteration over formal parameters for Global/Depends check X-Git-Tag: basepoints/gcc-13~7892 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=5a3070dff1aa805d425d97468ce6b817aa3156a3;p=thirdparty%2Fgcc.git [Ada] Simplify iteration over formal parameters for Global/Depends check gcc/ada/ * sem_prag.adb (Collect_Global_Item): Iterate directly over formals. --- diff --git a/gcc/ada/sem_prag.adb b/gcc/ada/sem_prag.adb index 0eb6ff653606..645b892ddd19 100644 --- a/gcc/ada/sem_prag.adb +++ b/gcc/ada/sem_prag.adb @@ -30246,7 +30246,7 @@ package body Sem_Prag is -- Process all formal parameters - Formal := First_Entity (Spec_Id); + Formal := First_Formal (Spec_Id); while Present (Formal) loop if Ekind (Formal) in E_In_Out_Parameter | E_In_Parameter then Append_New_Elmt (Formal, Subp_Inputs); @@ -30277,7 +30277,7 @@ package body Sem_Prag is Append_New_Elmt (Formal, Subp_Outputs); end if; - Next_Entity (Formal); + Next_Formal (Formal); end loop; -- Otherwise the input denotes a task type, a task body, or the