Move pr97315-1.c test to g++.dg/opt/.
authorAldy Hernandez <aldyh@redhat.com>
Fri, 9 Oct 2020 07:31:47 +0000 (09:31 +0200)
committerAldy Hernandez <aldyh@redhat.com>
Fri, 9 Oct 2020 08:15:54 +0000 (10:15 +0200)
gcc/testsuite/ChangeLog:

PR testsuite/97337
* gcc.dg/pr97315-1.c: Moved to...
* g++.dg/opt/pr97315-1.C: ...here.

gcc/testsuite/g++.dg/opt/pr97315-1.C [new file with mode: 0644]
gcc/testsuite/gcc.dg/pr97315-1.c [deleted file]

diff --git a/gcc/testsuite/g++.dg/opt/pr97315-1.C b/gcc/testsuite/g++.dg/opt/pr97315-1.C
new file mode 100644 (file)
index 0000000..5a618d8
--- /dev/null
@@ -0,0 +1,27 @@
+/* { dg-do compile } */
+/* { dg-options "-O3 -fno-exceptions" } */
+
+typedef struct tree_node *tree;
+enum tree_code { RECORD_TYPE, QUAL_UNION_TYPE };
+enum tree_code_class {};
+struct tree_base {
+  tree_code code : 16;
+};
+struct tree_node {
+  tree_base base;
+};
+extern tree_code_class tree_code_type[];
+void tree_check_failed() __attribute__((__noreturn__));
+tree tree_check3(tree __t, tree_code __c1, tree_code __c3) {
+  if (__t->base.code != __c1 && __t->base.code != __c3)
+    tree_check_failed();
+  return __t;
+}
+tree add_type_duplicate_type;
+void add_type_duplicate() {
+  if (tree_code_type[add_type_duplicate_type->base.code])
+    if (add_type_duplicate_type->base.code == RECORD_TYPE)
+      for (;
+           tree_check3(add_type_duplicate_type, RECORD_TYPE, QUAL_UNION_TYPE);)
+        tree_check3(add_type_duplicate_type, RECORD_TYPE, QUAL_UNION_TYPE);
+}
diff --git a/gcc/testsuite/gcc.dg/pr97315-1.c b/gcc/testsuite/gcc.dg/pr97315-1.c
deleted file mode 100644 (file)
index 250e0e9..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-/* { dg-do compile } */
-/* { dg-options "-O3" } */
-
-typedef struct tree_node *tree;
-enum tree_code { RECORD_TYPE, QUAL_UNION_TYPE };
-enum tree_code_class {};
-struct tree_base {
-  tree_code code : 16;
-};
-struct tree_node {
-  tree_base base;
-};
-extern tree_code_class tree_code_type[];
-void tree_check_failed() __attribute__((__noreturn__));
-tree tree_check3(tree __t, tree_code __c1, tree_code __c3) {
-  if (__t->base.code != __c1 && __t->base.code != __c3)
-    tree_check_failed();
-  return __t;
-}
-tree add_type_duplicate_type;
-void add_type_duplicate() {
-  if (tree_code_type[add_type_duplicate_type->base.code])
-    if (add_type_duplicate_type->base.code == RECORD_TYPE)
-      for (;
-           tree_check3(add_type_duplicate_type, RECORD_TYPE, QUAL_UNION_TYPE);)
-        tree_check3(add_type_duplicate_type, RECORD_TYPE, QUAL_UNION_TYPE);
-}