Iterator specifications of the In form without subtype indication are parsed
as a choice list, and later turned during semantic analysis into a bona-fide
N_Iterator_Specification node when there is a single choice with an iterator
type, but the case of the GNAT Iterable aspect is overlooked in the process.
gcc/ada/ChangeLog:
* sem_aggr.adb (Resolve_Array_Aggregate): Also rewrite a choice list
with a single choice as an iterator specification when the choice's
type has the GNAT Iterable aspect specified.
Analyze (Choice);
if Is_Object_Reference (Choice)
- and then Is_Iterator (Etype (Choice))
+ and then (Is_Iterator (Etype (Choice))
+ or else
+ Has_Aspect
+ (Etype (Choice), Aspect_Iterable))
then
Set_Iterator_Specification
(Assoc,