summaryrefslogtreecommitdiff
path: root/gcc/ada/ada-tree.h
diff options
context:
space:
mode:
authorcharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2005-03-18 11:47:18 +0000
committercharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2005-03-18 11:47:18 +0000
commit10d5317506f422b22d3cf3ed48a3fc6e211cb431 (patch)
tree65b5f248d06750565cc817641650223fd0f8922a /gcc/ada/ada-tree.h
parent46504d45fd7942be0cf3372995e24d79318cd6cd (diff)
downloadgcc-10d5317506f422b22d3cf3ed48a3fc6e211cb431.tar.gz
2005-03-17 Eric Botcazou <ebotcazou@adacore.com>
* ada-tree.h: (DECL_RENAMING_GLOBAL_P): New predicate. (DECL_RENAMED_OBJECT): New accessor macro. (SET_DECL_RENAMED_OBJECT): New setter macro. * decl.c (gnat_to_gnu_entity) <E_Variable>: Stabilize the renamed object in all cases. Attach the renamed object to the VAR_DECL. (gnat_to_gnu_field): Do not lift the record wrapper if the size of the field is not prescribed. * misc.c (gnat_handle_option): Handle -gnatO separately. (gnat_print_decl) <VAR_DECL>: New case. Print the DECL_RENAMED_OBJECT node. * lang.opt: Declare separate -gnatO option. * trans.c (tree_transform) <N_Identifier>: If the object is a renaming pointer, replace it with the renamed object. <N_Validate_Unchecked_Conversion>: Warn for a conversion to a fat pointer type if the source is not a fat pointer type whose underlying array has the same non-zero alias set as that of the destination array. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@96660 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/ada-tree.h')
-rw-r--r--gcc/ada/ada-tree.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/gcc/ada/ada-tree.h b/gcc/ada/ada-tree.h
index fad1513ab8f..4ea4b27a914 100644
--- a/gcc/ada/ada-tree.h
+++ b/gcc/ada/ada-tree.h
@@ -260,6 +260,9 @@ struct lang_type GTY(()) {tree t; };
/* Nonzero in a PARM_DECL if we are to pass by descriptor. */
#define DECL_BY_DESCRIPTOR_P(NODE) DECL_LANG_FLAG_5 (PARM_DECL_CHECK (NODE))
+/* Nonzero in a VAR_DECL if it is a pointer renaming a global object. */
+#define DECL_RENAMING_GLOBAL_P(NODE) DECL_LANG_FLAG_5 (VAR_DECL_CHECK (NODE))
+
/* In a CONST_DECL, points to a VAR_DECL that is allocatable to
memory. Used when a scalar constant is aliased or has its
address taken. */
@@ -275,6 +278,14 @@ struct lang_type GTY(()) {tree t; };
#define SET_DECL_ORIGINAL_FIELD(NODE, X) \
SET_DECL_LANG_SPECIFIC (FIELD_DECL_CHECK (NODE), X)
+/* In a VAR_DECL, points to the object being renamed if the VAR_DECL is a
+ renaming pointer, otherwise 0. Note that this object is guaranteed to
+ be protected against multiple evaluations. */
+#define DECL_RENAMED_OBJECT(NODE) \
+ GET_DECL_LANG_SPECIFIC (VAR_DECL_CHECK (NODE))
+#define SET_DECL_RENAMED_OBJECT(NODE, X) \
+ SET_DECL_LANG_SPECIFIC (VAR_DECL_CHECK (NODE), X)
+
/* In a FIELD_DECL corresponding to a discriminant, contains the
discriminant number. */
#define DECL_DISCRIMINANT_NUMBER(NODE) DECL_INITIAL (FIELD_DECL_CHECK (NODE))