aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite
diff options
context:
space:
mode:
authorEric Botcazou <ebotcazou@adacore.com>2015-11-30 12:20:06 +0000
committerEric Botcazou <ebotcazou@gcc.gnu.org>2015-11-30 12:20:06 +0000
commitf07862c7dd58714d601e776a130deb6df02bf022 (patch)
tree8ad814cbf8efa1134e6c6e30477eecc09ac41bf9 /gcc/testsuite
parentc8a23c29f7e61990d9f3fb36b4dfab8f46efa0ef (diff)
downloadgcc-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')
-rw-r--r--gcc/testsuite/ChangeLog6
-rw-r--r--gcc/testsuite/c-c++-common/dump-ada-spec-1.c (renamed from gcc/testsuite/gcc.dg/dump-ada-spec-1.c)0
-rw-r--r--gcc/testsuite/c-c++-common/dump-ada-spec-2.c49
3 files changed, 55 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index e31b7f0..25e67ca 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,5 +1,11 @@
2015-11-30 Eric Botcazou <ebotcazou@adacore.com>
+ * gcc.dg/dump-ada-spec-1.c: Move to...
+ * c-c++-common/dump-ada-spec-1.c: ...here.
+ * c-c++-common/dump-ada-spec-2.c: New test.
+
+2015-11-30 Eric Botcazou <ebotcazou@adacore.com>
+
* gnat.dg/loop_optimization22.ad[sb]: New test.
2015-11-30 Eric Botcazou <ebotcazou@adacore.com>
diff --git a/gcc/testsuite/gcc.dg/dump-ada-spec-1.c b/gcc/testsuite/c-c++-common/dump-ada-spec-1.c
index eb249e7..eb249e7 100644
--- a/gcc/testsuite/gcc.dg/dump-ada-spec-1.c
+++ b/gcc/testsuite/c-c++-common/dump-ada-spec-1.c
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 } } */