[Ada] Missing legality check on iterator over formal container
This patch adds a check on an iterator over a GNAT-specific formal container,
when the iterator specification includes a subtype indication that must be
compatible with the element type of the container.
2018-05-23 Ed Schonberg <schonberg@adacore.com>
gcc/ada/
* sem_ch5.adb (Analyze_Iterator_Specification): If a subtype indication
is present, verify its legality when the domain of iteration is a
GNAT-specific formal container, as is already done for arrays and
predefined containers.
gcc/testsuite/
* gnat.dg/iter1.adb, gnat.dg/iter1.ads: New testcase.
From-SVN: r260587