diff --git a/gcc/ada/freeze.adb b/gcc/ada/freeze.adb index 757c16e6839..7cf7e847677 100644 --- a/gcc/ada/freeze.adb +++ b/gcc/ada/freeze.adb @@ -9137,6 +9137,7 @@ package body Freeze is -- that type is not attached to an entity in the construct. elsif Nkind (Node) in N_Has_Etype + and then Present (Etype (Node)) and then Nkind (Parent (Node)) = N_Iterator_Specification and then Node = Name (Parent (Node)) then