From: Piotr Trojanek Date: Fri, 25 May 2018 09:04:09 +0000 (+0000) Subject: [Ada] Fix convention for iteration with multiple loop variables X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=308ac7f401cc93a8464f5c3cf415e4cc4552c12e;p=gcc.git [Ada] Fix convention for iteration with multiple loop variables Refactoring based on suggestions from GNAT frontend developers. Semantics unaffected. 2018-05-25 Piotr Trojanek gcc/ada/ * sem_util.adb (Iterate_Call_Parameters): Fix code convention and assertions. From-SVN: r260728 --- diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index a24c898722c..5596c595028 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,8 @@ +2018-05-25 Piotr Trojanek + + * sem_util.adb (Iterate_Call_Parameters): Fix code convention and + assertions. + 2018-05-25 Hristian Kirtchev * einfo.adb, einfo.ads, exp_ch3.adb, exp_ch8.adb, exp_unst.adb, diff --git a/gcc/ada/sem_util.adb b/gcc/ada/sem_util.adb index 81a056ecff6..00b7cfba891 100644 --- a/gcc/ada/sem_util.adb +++ b/gcc/ada/sem_util.adb @@ -17882,13 +17882,14 @@ package body Sem_Util is Formal : Entity_Id := First_Formal (Get_Called_Entity (Call)); begin - while Present (Formal) loop - pragma Assert (Present (Formal)); + while Present (Formal) and then Present (Actual) loop Handle_Parameter (Formal, Actual); + Next_Formal (Formal); Next_Actual (Actual); end loop; + pragma Assert (No (Formal)); pragma Assert (No (Actual)); end Iterate_Call_Parameters;