From bb24f34350078f92e8740713a4d241cb4c2fc9a7 Mon Sep 17 00:00:00 2001 From: Eric Botcazou Date: Mon, 9 Mar 2020 17:20:59 +0000 Subject: [Ada] Consolidate handling of implicit dereferences 2020-06-19 Eric Botcazou gcc/ada/ * gcc-interface/trans.c (adjust_for_implicit_deref): Delete. (maybe_implicit_deref): Likewise. (Attribute_to_gnu): Replace calls to maybe_implicit_deref by calls to maybe_padded_object. (Call_to_gnu): Likewise. (gnat_to_gnu) : Likewise. : Likewise. : Likewise. : Remove call to adjust_for_implicit_deref and manually make sure that the designated type is complete. * gcc-interface/utils2.c (build_simple_component_ref): Add comment. --- gcc/ada/gcc-interface/utils2.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'gcc/ada/gcc-interface/utils2.c') diff --git a/gcc/ada/gcc-interface/utils2.c b/gcc/ada/gcc-interface/utils2.c index a18d50f..364440b 100644 --- a/gcc/ada/gcc-interface/utils2.c +++ b/gcc/ada/gcc-interface/utils2.c @@ -1997,6 +1997,8 @@ build_simple_component_ref (tree record, tree field, bool no_fold) tree type = TYPE_MAIN_VARIANT (TREE_TYPE (record)); tree ref; + /* The failure of this assertion will very likely come from a missing + insertion of an explicit dereference. */ gcc_assert (RECORD_OR_UNION_TYPE_P (type) && COMPLETE_TYPE_P (type)); /* Try to fold a conversion from another record or union type unless the type -- cgit v1.1