public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc/devel/autopar_devel] [Ada] Subtype inherits Atomic flag from base type
@ 2020-08-22 22:06 Giuliano Belinassi
0 siblings, 0 replies; only message in thread
From: Giuliano Belinassi @ 2020-08-22 22:06 UTC (permalink / raw)
To: gcc-cvs
https://gcc.gnu.org/g:ae1ff15f17254489cccfb307656b3ce1d4fc4300
commit ae1ff15f17254489cccfb307656b3ce1d4fc4300
Author: Ed Schonberg <schonberg@adacore.com>
Date: Wed Feb 5 11:38:38 2020 -0500
[Ada] Subtype inherits Atomic flag from base type
2020-06-05 Ed Schonberg <schonberg@adacore.com>
gcc/ada/
* sem_ch3.adb (Analyze_Subtype_Declaration): For scalar types,
and for subtype declarations without a constraint, subtype
inherits Atomic flag from base type.
Diff:
---
gcc/ada/sem_ch3.adb | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/gcc/ada/sem_ch3.adb b/gcc/ada/sem_ch3.adb
index 3c65a340ff1..4d6382e59d4 100644
--- a/gcc/ada/sem_ch3.adb
+++ b/gcc/ada/sem_ch3.adb
@@ -5804,6 +5804,15 @@ package body Sem_Ch3 is
end if;
end if;
+ -- If the base type is a scalar type, or else if there is no
+ -- constraint, the atomic flag is inherited by the subtype.
+
+ if Is_Scalar_Type (Id)
+ or else Is_Entity_Name (Subtype_Indication (N))
+ then
+ Set_Is_Atomic (Id, Is_Atomic (T));
+ end if;
+
-- Remaining processing depends on characteristics of base type
T := Etype (Id);
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2020-08-22 22:06 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-22 22:06 [gcc/devel/autopar_devel] [Ada] Subtype inherits Atomic flag from base type Giuliano Belinassi
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).