]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Small fix to implementation of -fdump-ada-spec
authorEric Botcazou <ebotcazou@adacore.com>
Fri, 17 May 2024 09:44:30 +0000 (11:44 +0200)
committerEric Botcazou <ebotcazou@adacore.com>
Fri, 17 May 2024 09:45:40 +0000 (11:45 +0200)
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.

gcc/c-family/c-ada-spec.cc

index e56ef10f443a360974fb9ced24e55a2d0f6d7e62..46fee30b6b909e8c6277654d5e4ae1c044d0f792 100644 (file)
@@ -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