[Ada] Spurious visibility error on dynamic_predicate aspect in generic
Pierre-Marie de Rodat
derodat@adacore.com
Mon Jul 8 08:19:00 GMT 2019
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.
Tested on x86_64-pc-linux-gnu, committed on trunk
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.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch.diff
Type: text/x-diff
Size: 6102 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20190708/cc5d37d5/attachment.bin>
More information about the Gcc-patches
mailing list