diff options
author | Ghjuvan Lacambre <lacambre@adacore.com> | 2021-07-02 16:09:27 +0200 |
---|---|---|
committer | Pierre-Marie de Rodat <derodat@adacore.com> | 2021-09-21 15:24:58 +0000 |
commit | 69a0ff3416a5bbd8abcdd3fb85a387b2eccc88dc (patch) | |
tree | a8c509e39365613c1c1aa51541b3cb5062679873 | |
parent | 566b47901161e90d311d0b7cf6f385fedd0edb85 (diff) | |
download | gcc-69a0ff3416a5bbd8abcdd3fb85a387b2eccc88dc.zip gcc-69a0ff3416a5bbd8abcdd3fb85a387b2eccc88dc.tar.gz gcc-69a0ff3416a5bbd8abcdd3fb85a387b2eccc88dc.tar.bz2 |
[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.
-rw-r--r-- | gcc/ada/sem_eval.adb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/gcc/ada/sem_eval.adb b/gcc/ada/sem_eval.adb index 8817cea..da51caa 100644 --- a/gcc/ada/sem_eval.adb +++ b/gcc/ada/sem_eval.adb @@ -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; |