[Ada] Spurious error on 'First in a generic context
This patch fixes a spurious error on an attribute reference within an
aspect specification for an unconstrained array type when the
corresponding type declaration appears within a generic unit.
2019-07-04 Ed Schonberg <schonberg@adacore.com>
gcc/ada/
* sem_attr.adb (Check_Array_Type): An array type attribute such
as 'First can be applied to an unconstrained array tyope when
the attribute reference appears within an aspect specification
and the prefix is a current instance, given that the prefix of
the attribute will become a formal of the subprogram that
implements the aspect (typically a predicate check).
gcc/testsuite/
* gnat.dg/aspect2.adb, gnat.dg/aspect2.ads: New testcase.
From-SVN: r273058