diff options
author | Eric Botcazou <ebotcazou@adacore.com> | 2007-09-17 06:29:32 +0000 |
---|---|---|
committer | Eric Botcazou <ebotcazou@gcc.gnu.org> | 2007-09-17 06:29:32 +0000 |
commit | 2adde4ffdc7d4e2b529bd7c8a82afa73d8bbf775 (patch) | |
tree | 1c21561606030b469115cce26a81b3e91c932286 /gcc/ada | |
parent | b62a2e153492f5b8f7827ede61e1494785f14430 (diff) | |
download | gcc-2adde4ffdc7d4e2b529bd7c8a82afa73d8bbf775.zip gcc-2adde4ffdc7d4e2b529bd7c8a82afa73d8bbf775.tar.gz gcc-2adde4ffdc7d4e2b529bd7c8a82afa73d8bbf775.tar.bz2 |
decl.c (gnat_to_gnu_entity): Make again the type of an object covered by 13.3(19) volatile.
* decl.c (gnat_to_gnu_entity) <object>: Make again the type of an
object covered by 13.3(19) volatile.
From-SVN: r128538
Diffstat (limited to 'gcc/ada')
-rw-r--r-- | gcc/ada/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/ada/decl.c | 9 |
2 files changed, 10 insertions, 4 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index 65eeced..695d448 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,8 @@ +2007-09-17 Eric Botcazou <ebotcazou@adacore.com> + + * decl.c (gnat_to_gnu_entity) <object>: Make again the type of an + object covered by 13.3(19) volatile. + 2007-09-12 Eric Botcazou <ebotcazou@adacore.com> PR ada/26797 diff --git a/gcc/ada/decl.c b/gcc/ada/decl.c index 4b3edce..c625afb 100644 --- a/gcc/ada/decl.c +++ b/gcc/ada/decl.c @@ -728,12 +728,13 @@ gnat_to_gnu_entity (Entity_Id gnat_entity, tree gnu_expr, int definition) gnu_type = maybe_pad_type (gnu_type, gnu_size, align, gnat_entity, "PAD", false, definition, true); - /* Make a volatile version of this object's type if we are to - make the object volatile. Note that 13.3(19) says that we - should treat other types of objects as volatile as well. */ + /* Make a volatile version of this object's type if we are to make + the object volatile. We also interpret 13.3(19) conservatively + and disallow any optimizations for an object covered by it. */ if ((Treat_As_Volatile (gnat_entity) || Is_Exported (gnat_entity) - || Is_Imported (gnat_entity)) + || Is_Imported (gnat_entity) + || Present (Address_Clause (gnat_entity))) && !TYPE_VOLATILE (gnu_type)) gnu_type = build_qualified_type (gnu_type, (TYPE_QUALS (gnu_type) |