diff options
author | Eric Botcazou <ebotcazou@adacore.com> | 2020-03-09 17:20:59 +0000 |
---|---|---|
committer | Pierre-Marie de Rodat <derodat@adacore.com> | 2020-06-19 04:17:30 -0400 |
commit | bb24f34350078f92e8740713a4d241cb4c2fc9a7 (patch) | |
tree | 6e4e3bffd31b3e3527869692a45623cf56e4a5b1 /gcc/ada/gcc-interface/utils2.c | |
parent | c95f808ddd5046573423c9d1ee148645e5340738 (diff) | |
download | gcc-bb24f34350078f92e8740713a4d241cb4c2fc9a7.zip gcc-bb24f34350078f92e8740713a4d241cb4c2fc9a7.tar.gz gcc-bb24f34350078f92e8740713a4d241cb4c2fc9a7.tar.bz2 |
[Ada] Consolidate handling of implicit dereferences
2020-06-19 Eric Botcazou <ebotcazou@adacore.com>
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) <N_Indexed_Component>: Likewise.
<N_Slice>: Likewise.
<N_Selected_Component>: Likewise.
<N_Free_Statement>: 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.
Diffstat (limited to 'gcc/ada/gcc-interface/utils2.c')
-rw-r--r-- | gcc/ada/gcc-interface/utils2.c | 2 |
1 files changed, 2 insertions, 0 deletions
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 |