diff options
author | Piotr Trojanek <trojanek@adacore.com> | 2021-06-28 14:20:34 +0200 |
---|---|---|
committer | Pierre-Marie de Rodat <derodat@adacore.com> | 2021-09-20 12:31:36 +0000 |
commit | a06c060b1555a74d27d2573a25b769dd024023c0 (patch) | |
tree | e98f8480e338b29bf89189572d20d215d6cec0a4 /gcc/ada | |
parent | 8e5a8832632eecf5786dff295d073938aeb6d6d8 (diff) | |
download | gcc-a06c060b1555a74d27d2573a25b769dd024023c0.zip gcc-a06c060b1555a74d27d2573a25b769dd024023c0.tar.gz gcc-a06c060b1555a74d27d2573a25b769dd024023c0.tar.bz2 |
[Ada] Accept volatile expressions as non-scalar actual parameters
gcc/ada/
* sem_res.adb (Resolve_Actual): Remove
Diffstat (limited to 'gcc/ada')
-rw-r--r-- | gcc/ada/sem_res.adb | 26 |
1 files changed, 0 insertions, 26 deletions
diff --git a/gcc/ada/sem_res.adb b/gcc/ada/sem_res.adb index 03d747e..12b3295 100644 --- a/gcc/ada/sem_res.adb +++ b/gcc/ada/sem_res.adb @@ -3454,7 +3454,6 @@ package body Sem_Res is procedure Resolve_Actuals (N : Node_Id; Nam : Entity_Id) is Loc : constant Source_Ptr := Sloc (N); A : Node_Id; - A_Id : Entity_Id; A_Typ : Entity_Id := Empty; -- init to avoid warning F : Entity_Id; F_Typ : Entity_Id; @@ -4969,31 +4968,6 @@ package body Sem_Res is -- must be resolved first. Flag_Effectively_Volatile_Objects (A); - - -- An effectively volatile variable cannot act as an actual - -- parameter in a procedure call when the variable has enabled - -- property Effective_Reads and the corresponding formal is of - -- mode IN (SPARK RM 7.1.3(10)). - - if Ekind (Nam) = E_Procedure - and then Ekind (F) = E_In_Parameter - and then Is_Entity_Name (A) - then - A_Id := Entity (A); - - if Ekind (A_Id) = E_Variable - and then Is_Effectively_Volatile_For_Reading (Etype (A_Id)) - and then Effective_Reads_Enabled (A_Id) - then - Error_Msg_NE - ("effectively volatile variable & cannot appear as " - & "actual in procedure call", A, A_Id); - - Error_Msg_Name_1 := Name_Effective_Reads; - Error_Msg_N ("\\variable has enabled property %", A); - Error_Msg_N ("\\corresponding formal has mode IN", A); - end if; - end if; end if; -- A formal parameter of a specific tagged type whose related |