[Ada] Errors on globals in expressions of predicate aspects in generic bodies
commit64cb8ebef32c44ab7cab6021942df0b3d08a5fe5
authorGary Dismukes <dismukes@adacore.com>
Tue, 26 Oct 2021 00:45:50 +0000 (25 20:45 -0400)
committerPierre-Marie de Rodat <derodat@adacore.com>
Tue, 9 Nov 2021 09:44:47 +0000 (9 09:44 +0000)
tree9d2964c66c9ca8c9bce47a45d929985e9bbfa23d
parent1275c4031a7d3b55e127cab53f31362469f8c89b
[Ada] Errors on globals in expressions of predicate aspects in generic bodies

gcc/ada/

* sem_ch13.adb (Freeze_Entity_Checks): Analyze the expression of
a pragma Predicate associated with an aspect at the freeze point
of the type, to ensure that references to globals get saved when
the aspect occurs within a generic body. Also, add
Aspect_Static_Predicate to the choices of the membership test of
the enclosing guard.
gcc/ada/sem_ch13.adb