diff options
author | Eric Botcazou <ebotcazou@adacore.com> | 2016-06-21 21:34:12 +0000 |
---|---|---|
committer | Eric Botcazou <ebotcazou@gcc.gnu.org> | 2016-06-21 21:34:12 +0000 |
commit | d42b75599229d4a0e36fddae2931feff40ae7c03 (patch) | |
tree | e7b0e434edc72f983800394d5804a843fe014a03 /gcc/ada/gcc-interface/utils.c | |
parent | 5cd0a74a915cbd63653a8332c2a54c13bb33fbf4 (diff) | |
download | gcc-d42b75599229d4a0e36fddae2931feff40ae7c03.zip gcc-d42b75599229d4a0e36fddae2931feff40ae7c03.tar.gz gcc-d42b75599229d4a0e36fddae2931feff40ae7c03.tar.bz2 |
tree.c (verify_type_variant): Skip TYPE_SIZE and TYPE_SIZE_UNIT if they are both PLACEHOLDER_EXPRs.
* 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.
From-SVN: r237658
Diffstat (limited to 'gcc/ada/gcc-interface/utils.c')
-rw-r--r-- | gcc/ada/gcc-interface/utils.c | 15 |
1 files changed, 1 insertions, 14 deletions
diff --git a/gcc/ada/gcc-interface/utils.c b/gcc/ada/gcc-interface/utils.c index 1f1e4d3..8e4f863 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 |