diff options
author | Arnaud Charlet <charlet@gcc.gnu.org> | 2014-08-01 15:46:29 +0200 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2014-08-01 15:46:29 +0200 |
commit | 1eb5852081801218c02c934db5aa9852fc284645 (patch) | |
tree | 17c3243a6166917936352164905bb90a504297ef /gcc/ada/gcc-interface/ada-tree.h | |
parent | ecda544d41f26433d80a0632c09dec07fd2a8dfd (diff) | |
download | gcc-1eb5852081801218c02c934db5aa9852fc284645.zip gcc-1eb5852081801218c02c934db5aa9852fc284645.tar.gz gcc-1eb5852081801218c02c934db5aa9852fc284645.tar.bz2 |
ada-tree.h (DECL_BY_DESCRIPTOR_P): Delete.
2014-08-01 Eric Botcazou <ebotcazou@adacore.com>
* gcc-interface/ada-tree.h (DECL_BY_DESCRIPTOR_P): Delete.
(DECL_FUNCTION_STUB): Likewise.
(SET_DECL_FUNCTION_STUB): Likewise.
(DECL_PARM_ALT_TYPE): Likewise.
(SET_DECL_PARM_ALT_TYPE): Likewise.
(TYPE_VAX_FLOATING_POINT_P): Delete.
(TYPE_DIGITS_VALUE): Likewise.
(SET_TYPE_DIGITS_VALUE): Likewise.
* gcc-interface/gigi.h (standard_datatypes): Remove ADT_malloc32_decl.
(malloc32_decl): Delete.
(build_vms_descriptor): Likewise.
(build_vms_descriptor32): Likewise.
(fill_vms_descriptor): Likewise.
(convert_vms_descriptor): Likewise.
(TARGET_ABI_OPEN_VMS): Likewise.
(TARGET_MALLOC64): Likewise.
* gcc-interface/decl.c (add_parallel_type_for_packed_array): New.
(gnat_to_gnu_entity): Call it to add the original type as a parallel
type to the implementation type of a packed array type.
<E_Procedure>: Remove now obsolete kludge.
<E_Exception>: Delete obsolete comment.
<object>: Small tweak.
<E_Subprogram_Type>: Remove support for stub subprograms, as well as
for the descriptor passing mechanism.
(gnat_to_gnu_param): Likewise.
* gcc-interface/misc.c (gnat_init_gcc_fp): Remove special case.
(gnat_print_type): Adjust.
* gcc-interface/trans.c (gigi): Remove obsolete initializations.
(vms_builtin_establish_handler_decl): Delete.
(gnat_vms_condition_handler_decl): Likewise.
(establish_gnat_vms_condition_handler): Likewise.
(build_function_stub): Likewise.
(Subprogram_Body_to_gnu): Do not call above functions.
(Call_to_gnu): Remove support for the descriptor passing mechanism.
* gcc-interface/utils.c (make_descriptor_field): Delete.
(build_vms_descriptor32): Likewise.
(build_vms_descriptor): Likewise.
(fill_vms_descriptor): Likewise.
(convert_vms_descriptor64): Likewise.
(convert_vms_descriptor32): Likewise.
(convert_vms_descriptor): Likewise.
* gcc-interface/utils.c (unchecked_convert): Likewise.
* gcc-interface/utils2.c (maybe_wrap_malloc): Remove obsolete stuff.
2014-08-01 Eric Botcazou <ebotcazou@adacore.com>
* gcc-interface/trans.c (gigi): Use gnat_to_gnu_type for the exception
type and get_unpadded_type for the longest FP type.
(Attribute_to_gnu) <Machine>: Compare the precision of the types.
(convert_with_check): Adjust formatting and remove FIXME.
2014-08-01 Eric Botcazou <ebotcazou@adacore.com>
* gcc-interface/decl.c (gnat_to_gnu_entity) <E_Signed_Integer_Subtype>:
Do not convert the RM bounds to the base type.
(E_Floating_Point_Subtype): Likewise.
(E_Array_Subtype): Convert the bounds to the base type.
* gcc-interface/trans.c (get_type_length): New function.
(Attribute_to_gnu) <Range_Length>: Call it.
<Length>: Likewise.
(Loop_Statement_to_gnu): Convert the bounds to the base type.
(gnat_to_gnu) <N_In>: Likewise.
* gcc-interface/utils.c (make_type_from_size): Do not convert the RM
bounds to the base type.
(create_range_type): Likewise.
(convert): Convert the bounds to the base type for biased types.
* gcc-interface/utils2.c (compare_arrays): Convert the bounds to the
base type.
2014-08-01 Eric Botcazou <ebotcazou@adacore.com>
* gcc-interface/trans.c (gnat_to_gnu) <N_Selected_Component>: Remove
incorrect implicit type derivation.
* gcc-interface/utils.c (max_size) <tcc_reference>: Convert the bounds
to the base type.
From-SVN: r213462
Diffstat (limited to 'gcc/ada/gcc-interface/ada-tree.h')
-rw-r--r-- | gcc/ada/gcc-interface/ada-tree.h | 52 |
1 files changed, 21 insertions, 31 deletions
diff --git a/gcc/ada/gcc-interface/ada-tree.h b/gcc/ada/gcc-interface/ada-tree.h index d43eefa..ba5765d 100644 --- a/gcc/ada/gcc-interface/ada-tree.h +++ b/gcc/ada/gcc-interface/ada-tree.h @@ -120,11 +120,6 @@ do { \ || TREE_CODE (NODE) == ENUMERAL_TYPE) \ && TYPE_BY_REFERENCE_P (NODE)) -/* For INTEGER_TYPE, nonzero if this really represents a VAX - floating-point type. */ -#define TYPE_VAX_FLOATING_POINT_P(NODE) \ - TYPE_LANG_FLAG_3 (INTEGER_TYPE_CHECK (NODE)) - /* For RECORD_TYPE, UNION_TYPE, and QUAL_UNION_TYPE, nonzero if this is the type for an object whose type includes its template in addition to its value (only true for RECORD_TYPE). */ @@ -257,7 +252,11 @@ do { \ bound but they must nevertheless be valid in the GCC type system, otherwise the optimizer can pretend that they simply don't exist. Therefore they must be within the range of values allowed by the lower bound in the GCC - sense, hence the GCC lower bound be set to that of the base type. */ + sense, hence the GCC lower bound be set to that of the base type. + + This lower bound is translated directly without the adjustments that may + be required for type compatibility, so it will generally be necessary to + convert it to the base type of the numerical type before using it. */ #define TYPE_RM_MIN_VALUE(NODE) TYPE_RM_VALUE ((NODE), 1) #define SET_TYPE_RM_MIN_VALUE(NODE, X) SET_TYPE_RM_VALUE ((NODE), 1, (X)) @@ -269,7 +268,11 @@ do { \ bound but they must nevertheless be valid in the GCC type system, otherwise the optimizer can pretend that they simply don't exist. Therefore they must be within the range of values allowed by the upper bound in the GCC - sense, hence the GCC upper bound be set to that of the base type. */ + sense, hence the GCC upper bound be set to that of the base type. + + This upper bound is translated directly without the adjustments that may + be required for type compatibility, so it will generally be necessary to + convert it to the base type of the numerical type before using it. */ #define TYPE_RM_MAX_VALUE(NODE) TYPE_RM_VALUE ((NODE), 2) #define SET_TYPE_RM_MAX_VALUE(NODE, X) SET_TYPE_RM_VALUE ((NODE), 2, (X)) @@ -294,15 +297,18 @@ do { \ #define SET_TYPE_MODULUS(NODE, X) \ SET_TYPE_LANG_SPECIFIC (INTEGER_TYPE_CHECK (NODE), X) -/* For an INTEGER_TYPE with TYPE_VAX_FLOATING_POINT_P, this is the - Digits_Value. */ -#define TYPE_DIGITS_VALUE(NODE) \ - GET_TYPE_LANG_SPECIFIC (INTEGER_TYPE_CHECK (NODE)) -#define SET_TYPE_DIGITS_VALUE(NODE, X) \ - SET_TYPE_LANG_SPECIFIC (INTEGER_TYPE_CHECK (NODE), X) - /* For an INTEGER_TYPE that is the TYPE_DOMAIN of some ARRAY_TYPE, this is - the type corresponding to the Ada index type. */ + the type corresponding to the Ada index type. It is necessary to keep + these 2 views for every array type because the TYPE_DOMAIN is subject + to strong constraints in GENERIC: it must be a subtype of SIZETYPE and + may not be superflat, i.e. the upper bound must always be larger or + equal to the lower bound minus 1 (i.e. the canonical length formula + must always yield a non-negative number), which means that at least + one of the bounds may need to be a conditional expression. There are + no such constraints on the TYPE_INDEX_TYPE because gigi is prepared to + deal with the superflat case; moreover the TYPE_INDEX_TYPE is used as + the index type for the debug info and, therefore, needs to be as close + as possible to the source index type. */ #define TYPE_INDEX_TYPE(NODE) \ GET_TYPE_LANG_SPECIFIC (INTEGER_TYPE_CHECK (NODE)) #define SET_TYPE_INDEX_TYPE(NODE, X) \ @@ -388,9 +394,6 @@ do { \ is readonly. */ #define DECL_POINTS_TO_READONLY_P(NODE) DECL_LANG_FLAG_4 (NODE) -/* 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)) @@ -448,19 +451,6 @@ do { \ #define SET_DECL_PARALLEL_TYPE(NODE, X) \ SET_DECL_LANG_SPECIFIC (TYPE_DECL_CHECK (NODE), X) -/* In a FUNCTION_DECL, points to the stub associated with the function - if any, otherwise 0. */ -#define DECL_FUNCTION_STUB(NODE) \ - GET_DECL_LANG_SPECIFIC (FUNCTION_DECL_CHECK (NODE)) -#define SET_DECL_FUNCTION_STUB(NODE, X) \ - SET_DECL_LANG_SPECIFIC (FUNCTION_DECL_CHECK (NODE), X) - -/* In a PARM_DECL, points to the alternate TREE_TYPE. */ -#define DECL_PARM_ALT_TYPE(NODE) \ - GET_DECL_LANG_SPECIFIC (PARM_DECL_CHECK (NODE)) -#define SET_DECL_PARM_ALT_TYPE(NODE, X) \ - SET_DECL_LANG_SPECIFIC (PARM_DECL_CHECK (NODE), X) - /* Flags added to ref nodes. */ |