diff options
author | Piotr Trojanek <trojanek@adacore.com> | 2021-01-07 11:50:51 +0100 |
---|---|---|
committer | Pierre-Marie de Rodat <derodat@adacore.com> | 2021-05-04 05:17:34 -0400 |
commit | 5a3070dff1aa805d425d97468ce6b817aa3156a3 (patch) | |
tree | 0aff502229d9e7ca749d4c64489c562b79a23c67 | |
parent | 7f9f8889fedbe3cbba3cad870508bfc0336b3940 (diff) | |
download | gcc-5a3070dff1aa805d425d97468ce6b817aa3156a3.zip gcc-5a3070dff1aa805d425d97468ce6b817aa3156a3.tar.gz gcc-5a3070dff1aa805d425d97468ce6b817aa3156a3.tar.bz2 |
[Ada] Simplify iteration over formal parameters for Global/Depends check
gcc/ada/
* sem_prag.adb (Collect_Global_Item): Iterate directly over
formals.
-rw-r--r-- | gcc/ada/sem_prag.adb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gcc/ada/sem_prag.adb b/gcc/ada/sem_prag.adb index 0eb6ff6..645b892 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 |