[Ada] Fix ignored dynamic predicates specified through "predicate" aspect

gcc/ada/

	* sem_eval.adb (Is_Static_Subtype): Take predicates created
	through "predicate" pragma into account.
This commit is contained in:
Ghjuvan Lacambre 2021-07-02 16:09:27 +02:00 committed by Pierre-Marie de Rodat
parent 566b479011
commit 69a0ff3416

View File

@ -5741,6 +5741,8 @@ package body Sem_Eval is
elsif Has_Dynamic_Predicate_Aspect (Typ)
or else (Is_Derived_Type (Typ)
and then Has_Aspect (Typ, Aspect_Dynamic_Predicate))
or else (Has_Aspect (Typ, Aspect_Predicate)
and then not Has_Static_Predicate (Typ))
then
return False;