diff options
author | Eric Botcazou <ebotcazou@adacore.com> | 2015-11-30 12:20:06 +0000 |
---|---|---|
committer | Eric Botcazou <ebotcazou@gcc.gnu.org> | 2015-11-30 12:20:06 +0000 |
commit | f07862c7dd58714d601e776a130deb6df02bf022 (patch) | |
tree | 8ad814cbf8efa1134e6c6e30477eecc09ac41bf9 /gcc/testsuite/c-c++-common/dump-ada-spec-2.c | |
parent | c8a23c29f7e61990d9f3fb36b4dfab8f46efa0ef (diff) | |
download | gcc-f07862c7dd58714d601e776a130deb6df02bf022.zip gcc-f07862c7dd58714d601e776a130deb6df02bf022.tar.gz gcc-f07862c7dd58714d601e776a130deb6df02bf022.tar.bz2 |
c-ada-spec.c (print_ada_macros): Remove redundant blank line.
* c-ada-spec.c (print_ada_macros): Remove redundant blank line.
(decl_sloc_common): Delete and move bulk of processing to...
(decl_sloc): ...here.
(pp_ada_tree_identifier): Remove reference to QUAL_UNION_TYPE.
(dump_ada_double_name): Remove S parameter and compute the suffix.
(dump_ada_array_type): Add PARENT parameter. Simplify computation of
element type and deal with an anonymous one.
(dump_ada_template): Use RECORD_OR_UNION_TYPE_P macro.
(dump_generic_ada_node): Tweak. Adjust call to dump_ada_array_type
and remove reference to QUAL_UNION_TYPE.
(dump_nested_types): Make 2 passes on the fields and move bulk to...
(dump_nested_type): ...here. New function extracted from above.
Generate a full declaration for anonymous element type of arrays.
(print_ada_declaration): Really skip anonymous declarations. Remove
references to QUAL_UNION_TYPE. Adjust call to dump_ada_array_type.
Clean up processing of declarations of array types and objects.
(print_ada_struct_decl): Remove reference to QUAL_UNION_TYPE.
Remove obsolete code and tidy up.
From-SVN: r231069
Diffstat (limited to 'gcc/testsuite/c-c++-common/dump-ada-spec-2.c')
-rw-r--r-- | gcc/testsuite/c-c++-common/dump-ada-spec-2.c | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/gcc/testsuite/c-c++-common/dump-ada-spec-2.c b/gcc/testsuite/c-c++-common/dump-ada-spec-2.c new file mode 100644 index 0000000..46eedb5 --- /dev/null +++ b/gcc/testsuite/c-c++-common/dump-ada-spec-2.c @@ -0,0 +1,49 @@ +/* { dg-do compile } */ +/* { dg-options "-fdump-ada-spec" } */ + +struct S1 { + struct { + int i; + } F; +}; + +struct S2 { + union { + int i; + } F; +}; + +struct S3 { + struct { + int i; + } F[2]; +}; + +struct S4 { + struct { + struct S4 *next; + } F; +}; + +struct S5 { + struct { + struct S5 *next; + } F[2]; +}; + +struct S6 { + struct { + struct S6 *next[2]; + } F; +}; + +struct S7 { + struct { + int i; + } F1[2]; + struct { + float f; + } F2[2]; +}; + +/* { dg-final { cleanup-ada-spec } } */ |