aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Botcazou <ebotcazou@adacore.com>2024-05-17 11:44:30 +0200
committerEric Botcazou <ebotcazou@adacore.com>2024-05-17 11:45:40 +0200
commit6a0a46c57999d1f805f6c604a8868ae588a104f2 (patch)
tree9100ac094296c0e26b33b9c9379e2a7d8a3c0d98
parent4da8be4f46b5dad4f5f610fc142538054446f44b (diff)
downloadgcc-6a0a46c57999d1f805f6c604a8868ae588a104f2.zip
gcc-6a0a46c57999d1f805f6c604a8868ae588a104f2.tar.gz
gcc-6a0a46c57999d1f805f6c604a8868ae588a104f2.tar.bz2
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.
-rw-r--r--gcc/c-family/c-ada-spec.cc7
1 files changed, 3 insertions, 4 deletions
diff --git a/gcc/c-family/c-ada-spec.cc b/gcc/c-family/c-ada-spec.cc
index e56ef10f..46fee30 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