aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPiotr Trojanek <trojanek@adacore.com>2021-01-07 12:14:42 +0100
committerPierre-Marie de Rodat <derodat@adacore.com>2021-05-04 05:17:34 -0400
commit86203b44de9b6a3394816207728155164ea2caa0 (patch)
treee9767a73338e821d20fa937bf3e208692e54fbda
parent5a3070dff1aa805d425d97468ce6b817aa3156a3 (diff)
downloadgcc-86203b44de9b6a3394816207728155164ea2caa0.zip
gcc-86203b44de9b6a3394816207728155164ea2caa0.tar.gz
gcc-86203b44de9b6a3394816207728155164ea2caa0.tar.bz2
[Ada] Fix inconsistent iteration with First_Formal and Next_Entity
gcc/ada/ * sem_ch12.adb (Check_Abstract_Primitives): Match First_Formal with Next_Formal. * sem_ch6.adb (Is_Non_Overriding_Operation): Likewise.
-rw-r--r--gcc/ada/sem_ch12.adb4
-rw-r--r--gcc/ada/sem_ch6.adb4
2 files changed, 4 insertions, 4 deletions
diff --git a/gcc/ada/sem_ch12.adb b/gcc/ada/sem_ch12.adb
index 4761015..f635f25 100644
--- a/gcc/ada/sem_ch12.adb
+++ b/gcc/ada/sem_ch12.adb
@@ -13682,8 +13682,8 @@ package body Sem_Ch12 is
exit;
end if;
- Next_Entity (Anc_Formal);
- Next_Entity (Act_Formal);
+ Next_Formal (Anc_Formal);
+ Next_Formal (Act_Formal);
end loop;
-- If we traversed through all of the formals
diff --git a/gcc/ada/sem_ch6.adb b/gcc/ada/sem_ch6.adb
index cd3fd11..a53540d 100644
--- a/gcc/ada/sem_ch6.adb
+++ b/gcc/ada/sem_ch6.adb
@@ -10713,8 +10713,8 @@ package body Sem_Ch6 is
exit;
end if;
- Next_Entity (P_Formal);
- Next_Entity (N_Formal);
+ Next_Formal (P_Formal);
+ Next_Formal (N_Formal);
end loop;
-- Found a matching primitive operation belonging to the