diff options
author | Piotr Trojanek <trojanek@adacore.com> | 2020-12-22 00:58:21 +0100 |
---|---|---|
committer | Pierre-Marie de Rodat <derodat@adacore.com> | 2021-05-04 05:17:30 -0400 |
commit | 98a54aa50496f5c403ad34e5ef4e758945666be5 (patch) | |
tree | b6e1a9875c8fd252a5b5a52e6055cc6acc4e4148 /gcc | |
parent | 6aca8cf819fe5d12fe525788fbd8ff390fc57196 (diff) | |
download | gcc-98a54aa50496f5c403ad34e5ef4e758945666be5.zip gcc-98a54aa50496f5c403ad34e5ef4e758945666be5.tar.gz gcc-98a54aa50496f5c403ad34e5ef4e758945666be5.tar.bz2 |
[Ada] Check entries for formals of mode IN appearing as global outputs
gcc/ada/
* sem_prag.adb (Check_Mode_Restriction_In_Enclosing_Context):
Extend check to protected entries.
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ada/sem_prag.adb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gcc/ada/sem_prag.adb b/gcc/ada/sem_prag.adb index 3009421..b13894c 100644 --- a/gcc/ada/sem_prag.adb +++ b/gcc/ada/sem_prag.adb @@ -2634,7 +2634,7 @@ package body Sem_Prag is Context := Anonymous_Object (Context); end if; - if (Is_Subprogram (Context) + if (Is_Subprogram_Or_Entry (Context) or else Ekind (Context) = E_Task_Type or else Is_Single_Task_Object (Context)) and then @@ -2659,7 +2659,7 @@ package body Sem_Prag is ("global item & cannot have mode In_Out or Output", Item, Item_Id); - if Is_Subprogram (Context) then + if Is_Subprogram_Or_Entry (Context) then SPARK_Msg_NE (Fix_Msg (Subp_Id, "\item already appears as input " & "of subprogram &"), Item, Context); |