diff options
author | Eric Botcazou <ebotcazou@adacore.com> | 2005-03-18 12:47:18 +0100 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2005-03-18 12:47:18 +0100 |
commit | 7e1957a40d722beba8d9d002c7d15b01a18e7736 (patch) | |
tree | 65b5f248d06750565cc817641650223fd0f8922a /gcc/ada/ada-tree.h | |
parent | e602394c38b7ad5053769e2ff03550fd5b5d412a (diff) | |
download | gcc-7e1957a40d722beba8d9d002c7d15b01a18e7736.zip gcc-7e1957a40d722beba8d9d002c7d15b01a18e7736.tar.gz gcc-7e1957a40d722beba8d9d002c7d15b01a18e7736.tar.bz2 |
ada-tree.h: (DECL_RENAMING_GLOBAL_P): New predicate.
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.
From-SVN: r96660
Diffstat (limited to 'gcc/ada/ada-tree.h')
-rw-r--r-- | gcc/ada/ada-tree.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/gcc/ada/ada-tree.h b/gcc/ada/ada-tree.h index fad1513..4ea4b27 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)) |