diff options
Diffstat (limited to 'gcc/ada/sem_eval.adb')
-rw-r--r-- | gcc/ada/sem_eval.adb | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/gcc/ada/sem_eval.adb b/gcc/ada/sem_eval.adb index 94ce100a7c5..99b6e775218 100644 --- a/gcc/ada/sem_eval.adb +++ b/gcc/ada/sem_eval.adb @@ -1353,16 +1353,7 @@ package body Sem_Eval is if Ekind (E) = E_Enumeration_Literal then return True; - -- In SPARK mode, the value of deferred constants should be - -- ignored outside the scope of their full view. This allows - -- parameterized formal verification, in which a deferred constant - -- value if not known from client units. - - elsif Ekind (E) = E_Constant - and then not (SPARK_Mode - and then Present (Full_View (E)) - and then not In_Open_Scopes (Scope (E))) - then + elsif Ekind (E) = E_Constant then V := Constant_Value (E); return Present (V) and then Compile_Time_Known_Value (V); end if; @@ -5578,7 +5569,7 @@ package body Sem_Eval is then Error_Msg_N ("\aggregate (#) is never static", N); - elsif not Is_Static_Expression (CV) then + elsif No (CV) or else not Is_Static_Expression (CV) then Error_Msg_NE ("\& is not a static constant (RM 4.9(5))", N, E); end if; |