aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/gcc-interface/ada-tree.h
diff options
context:
space:
mode:
authorEric Botcazou <ebotcazou@adacore.com>2011-09-26 07:52:58 +0000
committerEric Botcazou <ebotcazou@gcc.gnu.org>2011-09-26 07:52:58 +0000
commit50179d5882b4abaed3c5deaa6a3068e01956fe29 (patch)
tree8d0ae965ac4142c79fa9762852ce25e5e0cdf3bf /gcc/ada/gcc-interface/ada-tree.h
parent382346e535ff0d18de34888258c948e908646fb6 (diff)
downloadgcc-50179d5882b4abaed3c5deaa6a3068e01956fe29.zip
gcc-50179d5882b4abaed3c5deaa6a3068e01956fe29.tar.gz
gcc-50179d5882b4abaed3c5deaa6a3068e01956fe29.tar.bz2
ada-tree.h (TYPE_NULL_BOUNDS): New macro.
* gcc-interface/ada-tree.h (TYPE_NULL_BOUNDS): New macro. (SET_TYPE_NULL_BOUNDS): Likewise. * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: Set again TREE_THIS_NOTRAP on the INDIRECT_REF node built for the template. * gcc-interface/trans.c (Identifier_to_gnu): Return initializers of fat pointer types. * gcc-interface/utils.c (create_var_decl_1): If the object is external, check that the initializer is a valid constant expression for use in initializing a static variable. Add missing guard. (update_pointer_to): Adjust TYPE_NULL_BOUNDS if set. (convert_to_fat_pointer): In the null fat pointer case, build a valid pointer for the bounds. * gcc-interface/utils2.c (compare_fat_pointers): New function. (build_binary_op) <EQ_EXPR>: Call it to compare fat pointers. From-SVN: r179180
Diffstat (limited to 'gcc/ada/gcc-interface/ada-tree.h')
-rw-r--r--gcc/ada/gcc-interface/ada-tree.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/gcc/ada/gcc-interface/ada-tree.h b/gcc/ada/gcc-interface/ada-tree.h
index 150dd86..4a0981d 100644
--- a/gcc/ada/gcc-interface/ada-tree.h
+++ b/gcc/ada/gcc-interface/ada-tree.h
@@ -275,7 +275,8 @@ do { \
/* For an INTEGER_TYPE with TYPE_MODULAR_P, this is the value of the
modulus. */
-#define TYPE_MODULUS(NODE) GET_TYPE_LANG_SPECIFIC (INTEGER_TYPE_CHECK (NODE))
+#define TYPE_MODULUS(NODE) \
+ GET_TYPE_LANG_SPECIFIC (INTEGER_TYPE_CHECK (NODE))
#define SET_TYPE_MODULUS(NODE, X) \
SET_TYPE_LANG_SPECIFIC (INTEGER_TYPE_CHECK (NODE), X)
@@ -301,6 +302,13 @@ do { \
#define SET_TYPE_ACTUAL_BOUNDS(NODE, X) \
SET_TYPE_LANG_SPECIFIC (TREE_CHECK2 (NODE, INTEGER_TYPE, ARRAY_TYPE), X)
+/* For a POINTER_TYPE that points to the template type of an unconstrained
+ array type, this is the address to be used in a null fat pointer. */
+#define TYPE_NULL_BOUNDS(NODE) \
+ GET_TYPE_LANG_SPECIFIC (POINTER_TYPE_CHECK (NODE))
+#define SET_TYPE_NULL_BOUNDS(NODE, X) \
+ SET_TYPE_LANG_SPECIFIC (POINTER_TYPE_CHECK (NODE), X)
+
/* For a RECORD_TYPE that is a fat pointer, this is the type for the
unconstrained object. Likewise for a RECORD_TYPE that is pointed
to by a thin pointer. */