diff options
author | Eric Botcazou <ebotcazou@gcc.gnu.org> | 2020-05-09 23:04:38 +0200 |
---|---|---|
committer | Eric Botcazou <ebotcazou@gcc.gnu.org> | 2020-05-09 23:06:26 +0200 |
commit | 1e3cabd45d499652abc3bfe28f82a363ed70390d (patch) | |
tree | be260f6939c2fd83660d66e17a0ebcd621d80654 /gcc/ada/gcc-interface/ada-tree.h | |
parent | 2448ee85a89f313e48ee40eaed0d645c4c027944 (diff) | |
download | gcc-1e3cabd45d499652abc3bfe28f82a363ed70390d.zip gcc-1e3cabd45d499652abc3bfe28f82a363ed70390d.tar.gz gcc-1e3cabd45d499652abc3bfe28f82a363ed70390d.tar.bz2 |
Fix small issues with -fgnat-encodings=minimal
This is the mode where the GNAT compiler does not use special encodings
in the debug info to describe some Ada constructs, for example packed
array types.
* gcc-interface/ada-tree.h (TYPE_PACKED_ARRAY_TYPE_P): Rename into...
(TYPE_BIT_PACKED_ARRAY_TYPE_P): ...this.
(TYPE_IS_PACKED_ARRAY_TYPE_P): Rename into...
(BIT_PACKED_ARRAY_TYPE_P): ...this.
(TYPE_IMPL_PACKED_ARRAY_P): Adjust to above renaming.
* gcc-interface/gigi.h (maybe_pad_type): Remove IS_USER_TYPE..
* gcc-interface/decl.c (gnat_to_gnu_entity) <E_Variable>: Adjust
call to maybe_pad_type.
<E_Ordinary_Fixed_Point_Type>: Remove const qualifiers for tree.
<E_Signed_Integer_Subtype>: Remove redundant test and redundant call
to associate_original_type_to_packed_array. Turn into assertion.
Call associate_original_type_to_packed_array and modify
gnu_entity_name accordingly. Explicitly set the parallel type
for GNAT encodings.
Call create_type_decl in the misaligned case before maybe_pad_type.
<E_Array_Type>: Do not use the name of the implementation type for
a packed array when not using GNAT encodings.
<E_Array_Subtype>: Move around setting flags. Use the result of the
call to associate_original_type_to_packed_array for gnu_entity_name.
<E_Record_Subtype>: Create XVS type and XVZ variable only if debug
info is requested for the type.
Call create_type_decl if a padded type was created for a type entity
(gnat_to_gnu_component_type): Use local variable and adjust calls to
maybe_pad_type.
(gnat_to_gnu_subprog_type): Adjust call to maybe_pad_type.
(gnat_to_gnu_field): Likewise.
(validate_size): Adjust to renaming of macro.
(set_rm_size): Likewise.
(associate_original_type_to_packed_array): Adjust return type and
return the name of the original type if GNAT encodings are not used
* gcc-interface/misc.c (gnat_get_debug_typ): Remove obsolete stuff.
(gnat_get_fixed_point_type_info): Remove const qualifiers for tree.
(gnat_get_array_descr_info): Likewise and set variables lazily.
Remove call to maybe_debug_type. Simplify a few computations.
(enumerate_modes): Remove const qualifier for tree.
* gcc-interface/utils.c (make_type_from_size): Adjust to renaming.
(maybe_pad_type): Remove IS_USER_TYPE parameter and adjust. Remove
specific code for implementation types for packed arrays.
(compute_deferred_decl_context): Remove const qualifier for tree.
(convert): Adjust call to maybe_pad_type.
(unchecked_convert): Likewise.
* gcc-interface/utils2.c (is_simple_additive_expressio): Likewise.
Diffstat (limited to 'gcc/ada/gcc-interface/ada-tree.h')
-rw-r--r-- | gcc/ada/gcc-interface/ada-tree.h | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/gcc/ada/gcc-interface/ada-tree.h b/gcc/ada/gcc-interface/ada-tree.h index acea5d1..47c2e14 100644 --- a/gcc/ada/gcc-interface/ada-tree.h +++ b/gcc/ada/gcc-interface/ada-tree.h @@ -73,15 +73,15 @@ do { \ #define TYPE_IS_FAT_POINTER_P(NODE) \ (TREE_CODE (NODE) == RECORD_TYPE && TYPE_FAT_POINTER_P (NODE)) -/* For integral types and array types, nonzero if this is a packed array type - used for bit-packed types. Such types should not be extended to a larger - size or validated against a specified size. */ -#define TYPE_PACKED_ARRAY_TYPE_P(NODE) \ +/* For integral types and array types, nonzero if this is an implementation + type for a bit-packed array type. Such types should not be extended to a + larger size or validated against a specified size. */ +#define TYPE_BIT_PACKED_ARRAY_TYPE_P(NODE) \ TYPE_LANG_FLAG_0 (TREE_CHECK2 (NODE, INTEGER_TYPE, ARRAY_TYPE)) -#define TYPE_IS_PACKED_ARRAY_TYPE_P(NODE) \ +#define BIT_PACKED_ARRAY_TYPE_P(NODE) \ ((TREE_CODE (NODE) == INTEGER_TYPE || TREE_CODE (NODE) == ARRAY_TYPE) \ - && TYPE_PACKED_ARRAY_TYPE_P (NODE)) + && TYPE_BIT_PACKED_ARRAY_TYPE_P (NODE)) /* For FUNCTION_TYPE and METHOD_TYPE, nonzero if the function returns by direct reference, i.e. the callee returns a pointer to a memory location @@ -196,7 +196,7 @@ do { \ types. */ #define TYPE_IMPL_PACKED_ARRAY_P(NODE) \ ((TREE_CODE (NODE) == ARRAY_TYPE && TYPE_PACKED (NODE)) \ - || (TREE_CODE (NODE) == INTEGER_TYPE && TYPE_PACKED_ARRAY_TYPE_P (NODE))) + || (TREE_CODE (NODE) == INTEGER_TYPE && TYPE_BIT_PACKED_ARRAY_TYPE_P (NODE))) /* True for types that can hold a debug type. */ #define TYPE_CAN_HAVE_DEBUG_TYPE_P(NODE) (!TYPE_IMPL_PACKED_ARRAY_P (NODE)) |