aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/gcc-interface/utils.c
diff options
context:
space:
mode:
authorEric Botcazou <ebotcazou@adacore.com>2016-06-21 21:34:12 +0000
committerEric Botcazou <ebotcazou@adacore.com>2016-06-21 21:34:12 +0000
commitf1171475cd00e319fe72f8c3393901d9eb85ba43 (patch)
treee7b0e434edc72f983800394d5804a843fe014a03 /gcc/ada/gcc-interface/utils.c
parent370dcb7d1a730c8234db4e2f80b54a397ce50e01 (diff)
* tree.c (verify_type_variant): Skip TYPE_SIZE and TYPE_SIZE_UNIT if
they are both PLACEHOLDER_EXPRs. ada/ * gcc-interface/decl.c (set_nonaliased_component_on_array_type): New function. (set_reverse_storage_order_on_array_type): Likewise. (gnat_to_gnu_entity) <E_Array_Type>: Call them to set the flags. <E_Array_Subtype>: Likewise. <E_String_Literal_Subtype>: Likewise. (substitute_in_type) <ARRAY_TYPE>: Likewise. * gcc-interface/utils.c (gnat_pushdecl): Always create a variant for the DECL_ORIGINAL_TYPE of a type. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@237658 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/gcc-interface/utils.c')
-rw-r--r--gcc/ada/gcc-interface/utils.c15
1 files changed, 1 insertions, 14 deletions
diff --git a/gcc/ada/gcc-interface/utils.c b/gcc/ada/gcc-interface/utils.c
index 1f1e4d3b814..8e4f8638258 100644
--- a/gcc/ada/gcc-interface/utils.c
+++ b/gcc/ada/gcc-interface/utils.c
@@ -789,24 +789,11 @@ gnat_pushdecl (tree decl, Node_Id gnat_node)
|| TREE_CODE (t) == POINTER_TYPE
|| TYPE_IS_FAT_POINTER_P (t)))
{
- tree tt;
- /* ??? Copy and original type are not supposed to be variant but we
- really need a variant for the placeholder machinery to work. */
- if (TYPE_IS_FAT_POINTER_P (t))
- tt = build_variant_type_copy (t);
- else
- {
- /* TYPE_NEXT_PTR_TO is a chain of main variants. */
- tt = build_distinct_type_copy (TYPE_MAIN_VARIANT (t));
- if (TREE_CODE (t) == POINTER_TYPE)
- TYPE_NEXT_PTR_TO (TYPE_MAIN_VARIANT (t)) = tt;
- tt = build_qualified_type (tt, TYPE_QUALS (t));
- }
+ tree tt = build_variant_type_copy (t);
TYPE_NAME (tt) = decl;
defer_or_set_type_context (tt,
DECL_CONTEXT (decl),
deferred_decl_context);
- TREE_USED (tt) = TREE_USED (t);
TREE_TYPE (decl) = tt;
if (TYPE_NAME (t)
&& TREE_CODE (TYPE_NAME (t)) == TYPE_DECL