[Ada] Spurious visibility error on dynamic_predicate aspect in generic
This patch fixes a spurious error when verifying that the visibility of the expression of an aspect has not changed between the freeze point of the entity to which it applies, and the end of the enclosing declarative part. If the entity is a composite type its components must be made directly visible for the analysis of the expression. In a generic context this must be done explicitly at the end of the declarative part. 2019-07-08 Ed Schonberg <schonberg@adacore.com> gcc/ada/ * sem_ch13.adb (Check_Aspect_At_End_Of_Declarations): For an unanalized aspect in a generic context that has not been analyzed yet, if the aspect applies to a type, place the type on the scope stack to make its components visible, before checking conformance with the version of the expression analyzed at the freeze point. gcc/testsuite/ * gnat.dg/predicate8.adb, gnat.dg/predicate8_pkg.adb, gnat.dg/predicate8_pkg.ads: New testcase. From-SVN: r273197
Showing
gcc/testsuite/gnat.dg/predicate8.adb
0 → 100644
gcc/testsuite/gnat.dg/predicate8_pkg.adb
0 → 100644
gcc/testsuite/gnat.dg/predicate8_pkg.ads
0 → 100644
Please
register
or
sign in
to comment