https://gcc.gnu.org/g:bbdc0829284bae43305c97ff539948f36689673a
commit r17-936-gbbdc0829284bae43305c97ff539948f36689673a Author: Claire Dross <[email protected]> Date: Wed Mar 11 10:25:16 2026 +0100 ada: Enable resolution of overloading on Last and Previous for Iterable The resolution of overloading for the optional Last and Previous primitives of an Iterable aspect should be done like for other primitives. gcc/ada/ChangeLog: * sem_ch13.adb (Resolve_Iterable_Operation): Handle Previous and Last like Next and First. Diff: --- gcc/ada/sem_ch13.adb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gcc/ada/sem_ch13.adb b/gcc/ada/sem_ch13.adb index a08b13445db5..03063a694259 100644 --- a/gcc/ada/sem_ch13.adb +++ b/gcc/ada/sem_ch13.adb @@ -18057,7 +18057,7 @@ package body Sem_Ch13 is then F1 := First_Formal (It.Nam); - if Nam = Name_First then + if Nam in Name_First | Name_Last then if Etype (It.Nam) = Cursor and then No (Next_Formal (F1)) then @@ -18065,7 +18065,7 @@ package body Sem_Ch13 is exit; end if; - elsif Nam = Name_Next then + elsif Nam in Name_Next | Name_Previous then F2 := Next_Formal (F1); if Present (F2)
