public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r12-2032] [Ada] Adapt SPARK RM rule on non-effectively volatile abstract state
@ 2021-07-05 13:15 Pierre-Marie de Rodat
0 siblings, 0 replies; only message in thread
From: Pierre-Marie de Rodat @ 2021-07-05 13:15 UTC (permalink / raw)
To: gcc-cvs
https://gcc.gnu.org/g:902d7076663aff56198b81f8efa356c3e1024e80
commit r12-2032-g902d7076663aff56198b81f8efa356c3e1024e80
Author: Yannick Moy <moy@adacore.com>
Date: Fri Apr 30 12:41:22 2021 +0200
[Ada] Adapt SPARK RM rule on non-effectively volatile abstract state
gcc/ada/
* sem_prag.adb (Analyze_Global_Item): Adapt to update SPARK RM
rule.
Diff:
---
gcc/ada/sem_prag.adb | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/gcc/ada/sem_prag.adb b/gcc/ada/sem_prag.adb
index fa63fdae730..0efdceff5e7 100644
--- a/gcc/ada/sem_prag.adb
+++ b/gcc/ada/sem_prag.adb
@@ -2433,10 +2433,13 @@ package body Sem_Prag is
SPARK_Msg_N ("\use its constituents instead", Item);
return;
- -- An external state cannot appear as a global item of a
- -- nonvolatile function (SPARK RM 7.1.3(8)).
+ -- An external state which has Async_Writers or
+ -- Effective_Reads enabled cannot appear as a global item
+ -- of a nonvolatile function (SPARK RM 7.1.3(8)).
elsif Is_External_State (Item_Id)
+ and then (Async_Writers_Enabled (Item_Id)
+ or else Effective_Reads_Enabled (Item_Id))
and then Ekind (Spec_Id) in E_Function | E_Generic_Function
and then not Is_Volatile_Function (Spec_Id)
then
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2021-07-05 13:15 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-05 13:15 [gcc r12-2032] [Ada] Adapt SPARK RM rule on non-effectively volatile abstract state Pierre-Marie de Rodat
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).