Commit 2adde4ff by Eric Botcazou Committed by Eric Botcazou

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
parent b62a2e15
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> 2007-09-12 Eric Botcazou <ebotcazou@adacore.com>
PR ada/26797 PR ada/26797
...@@ -728,12 +728,13 @@ gnat_to_gnu_entity (Entity_Id gnat_entity, tree gnu_expr, int definition) ...@@ -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, gnu_type = maybe_pad_type (gnu_type, gnu_size, align, gnat_entity,
"PAD", false, definition, true); "PAD", false, definition, true);
/* Make a volatile version of this object's type if we are to /* Make a volatile version of this object's type if we are to make
make the object volatile. Note that 13.3(19) says that we the object volatile. We also interpret 13.3(19) conservatively
should treat other types of objects as volatile as well. */ and disallow any optimizations for an object covered by it. */
if ((Treat_As_Volatile (gnat_entity) if ((Treat_As_Volatile (gnat_entity)
|| Is_Exported (gnat_entity) || Is_Exported (gnat_entity)
|| Is_Imported (gnat_entity)) || Is_Imported (gnat_entity)
|| Present (Address_Clause (gnat_entity)))
&& !TYPE_VOLATILE (gnu_type)) && !TYPE_VOLATILE (gnu_type))
gnu_type = build_qualified_type (gnu_type, gnu_type = build_qualified_type (gnu_type,
(TYPE_QUALS (gnu_type) (TYPE_QUALS (gnu_type)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment