aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/gcc-interface/misc.c
diff options
context:
space:
mode:
authorEric Botcazou <ebotcazou@adacore.com>2021-06-04 18:22:17 +0200
committerPierre-Marie de Rodat <derodat@adacore.com>2021-07-12 12:50:57 +0000
commit58d32c72ca0156b0267a9b36b91b414cab8978f2 (patch)
tree51b15e14a84852a7baed1d67dc6fe7fad1844a89 /gcc/ada/gcc-interface/misc.c
parent3ccd5d7192603e0ed6d0020658291b7c96f5651b (diff)
downloadgcc-58d32c72ca0156b0267a9b36b91b414cab8978f2.zip
gcc-58d32c72ca0156b0267a9b36b91b414cab8978f2.tar.gz
gcc-58d32c72ca0156b0267a9b36b91b414cab8978f2.tar.bz2
[Ada] Use GNAT encodings only when -fgnat-encodings=all is specified
gcc/ada/ * gcc-interface/decl.c (gnat_to_gnu_entity) <discrete_type>: Add a parallel type only when -fgnat-encodings=all is specified. <E_Array_Type>: Use the PAT name and special suffixes only when -fgnat-encodings=all is specified. <E_Array_Subtype>: Build a special type for debugging purposes only when -fgnat-encodings=all is specified. Add a parallel type or use the PAT name only when -fgnat-encodings=all is specified. <E_Record_Type>: Generate debug info for the inner record types only when -fgnat-encodings=all is specified. <E_Record_Subtype>: Use a debug type for an artificial subtype only except when -fgnat-encodings=all is specified. (elaborate_expression_1): Reset need_for_debug when possible only except when -fgnat-encodings=all is specified. (components_to_record): Use XV encodings for variable size only when -fgnat-encodings=all is specified. (associate_original_type_to_packed_array): Add a parallel type only when -fgnat-encodings=all is specified. * gcc-interface/misc.c (gnat_get_array_descr_info): Do not return full information only when -fgnat-encodings=all is specified. * gcc-interface/utils.c (make_packable_type): Add a parallel type only when -fgnat-encodings=all is specified. (maybe_pad_type): Make the inner type a debug type only except when -fgnat-encodings=all is specified. Create an XVS type for variable size only when -fgnat-encodings=all is specified. (rest_of_record_type_compilation): Add a parallel type only when -fgnat-encodings=all is specified.
Diffstat (limited to 'gcc/ada/gcc-interface/misc.c')
-rw-r--r--gcc/ada/gcc-interface/misc.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/gcc/ada/gcc-interface/misc.c b/gcc/ada/gcc-interface/misc.c
index 72a2624..186367a 100644
--- a/gcc/ada/gcc-interface/misc.c
+++ b/gcc/ada/gcc-interface/misc.c
@@ -806,7 +806,7 @@ gnat_get_array_descr_info (const_tree const_type,
/* As well as array types embedded in a record type with their bounds. */
else if (TREE_CODE (type) == RECORD_TYPE
&& TYPE_CONTAINS_TEMPLATE_P (type)
- && gnat_encodings == DWARF_GNAT_ENCODINGS_MINIMAL)
+ && gnat_encodings != DWARF_GNAT_ENCODINGS_ALL)
{
/* This will be our base object address. Note that we assume that
pointers to this will actually point to the array field (thin
@@ -901,7 +901,7 @@ gnat_get_array_descr_info (const_tree const_type,
if (TYPE_CONTEXT (first_dimen)
&& TREE_CODE (TYPE_CONTEXT (first_dimen)) != RECORD_TYPE
&& CONTAINS_PLACEHOLDER_P (TYPE_MIN_VALUE (index_type))
- && gnat_encodings != DWARF_GNAT_ENCODINGS_MINIMAL)
+ && gnat_encodings == DWARF_GNAT_ENCODINGS_ALL)
{
info->dimen[i].lower_bound = NULL_TREE;
info->dimen[i].upper_bound = NULL_TREE;
@@ -943,7 +943,7 @@ gnat_get_array_descr_info (const_tree const_type,
info->associated = NULL_TREE;
info->data_location = NULL_TREE;
- if (gnat_encodings == DWARF_GNAT_ENCODINGS_MINIMAL)
+ if (gnat_encodings != DWARF_GNAT_ENCODINGS_ALL)
{
/* When arrays contain dynamically-sized elements, we usually wrap them
in padding types, or we create constrained types for them. Then, if