https://gcc.gnu.org/g:6a0a46c57999d1f805f6c604a8868ae588a104f2
commit r15-625-g6a0a46c57999d1f805f6c604a8868ae588a104f2 Author: Eric Botcazou <ebotca...@adacore.com> Date: Fri May 17 11:44:30 2024 +0200 Small fix to implementation of -fdump-ada-spec gcc/c-family/ * c-ada-spec.cc (bitfield_used): Move around. (packed_layout): Likewise. (dump_ada_array_type): Do not put "aliased" for a packed layout. Diff: --- gcc/c-family/c-ada-spec.cc | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/gcc/c-family/c-ada-spec.cc b/gcc/c-family/c-ada-spec.cc index e56ef10f443a..46fee30b6b90 100644 --- a/gcc/c-family/c-ada-spec.cc +++ b/gcc/c-family/c-ada-spec.cc @@ -699,6 +699,8 @@ compare_comment (const void *lp, const void *rp) static tree *to_dump = NULL; static int to_dump_count = 0; +static bool bitfield_used = false; +static bool packed_layout = false; /* Collect a list of declarations from T relevant to SOURCE_FILE to be dumped by a subsequent call to dump_ada_nodes. */ @@ -1825,7 +1827,7 @@ dump_ada_array_type (pretty_printer *buffer, tree node, int spc) pp_string (buffer, " of "); - if (TREE_CODE (tmp) != POINTER_TYPE) + if (TREE_CODE (tmp) != POINTER_TYPE && !packed_layout) pp_string (buffer, "aliased "); if (TYPE_NAME (tmp) @@ -2083,9 +2085,6 @@ is_float128 (tree node) || id_equal (name, "_Float128x"); } -static bool bitfield_used = false; -static bool packed_layout = false; - /* Recursively dump in BUFFER Ada declarations corresponding to NODE of type TYPE. SPC is the indentation level. LIMITED_ACCESS indicates whether NODE can be referenced via a "limited with" clause. NAME_ONLY indicates whether