[PATCH] [Commmitted] Move some testcases to torture from tree-ssa

apinski@marvell.com apinski@marvell.com
Mon Nov 15 00:01:36 GMT 2021


From: Andrew Pinski <apinski@marvell.com>

While writing up some testcases, I noticed some newer testcases
just had "dg-do compile/run" on them with dg-options of either -O1
or -O2. Since it is always better to run them over all optimization
levels I put them in gcc.c-torture/compile or gcc.c-torture/execute.

Committed after testing to make sure the testcases pass.

gcc/testsuite/ChangeLog:

	* gcc.dg/tree-ssa/pr100278.c: Move to ...
	* gcc.c-torture/compile/pr100278.c: Here.
	Remove dg-do and dg-options.
	* gcc.dg/tree-ssa/pr101189.c: Move to ...
	* gcc.c-torture/compile/pr101189.c: Here.
	Remove dg-do and dg-options.
	* gcc.dg/tree-ssa/pr100453.c: Move to ...
	* gcc.c-torture/execute/pr100453.c: Here.
	Remove dg-do and dg-options.
	* gcc.dg/tree-ssa/pr101335.c: Move to ...
	* gcc.c-torture/execute/pr101335.c: Here
	Remove dg-do and dg-options.
---
 gcc/testsuite/gcc.c-torture/compile/pr100278.c | 15 +++++++++++++++
 gcc/testsuite/gcc.c-torture/compile/pr101189.c | 15 +++++++++++++++
 gcc/testsuite/gcc.c-torture/execute/pr100453.c | 16 ++++++++++++++++
 gcc/testsuite/gcc.c-torture/execute/pr101335.c | 15 +++++++++++++++
 gcc/testsuite/gcc.dg/tree-ssa/pr100278.c       | 17 -----------------
 gcc/testsuite/gcc.dg/tree-ssa/pr100453.c       | 18 ------------------
 gcc/testsuite/gcc.dg/tree-ssa/pr101189.c       | 17 -----------------
 gcc/testsuite/gcc.dg/tree-ssa/pr101335.c       | 17 -----------------
 8 files changed, 61 insertions(+), 69 deletions(-)
 create mode 100644 gcc/testsuite/gcc.c-torture/compile/pr100278.c
 create mode 100644 gcc/testsuite/gcc.c-torture/compile/pr101189.c
 create mode 100644 gcc/testsuite/gcc.c-torture/execute/pr100453.c
 create mode 100644 gcc/testsuite/gcc.c-torture/execute/pr101335.c
 delete mode 100644 gcc/testsuite/gcc.dg/tree-ssa/pr100278.c
 delete mode 100644 gcc/testsuite/gcc.dg/tree-ssa/pr100453.c
 delete mode 100644 gcc/testsuite/gcc.dg/tree-ssa/pr101189.c
 delete mode 100644 gcc/testsuite/gcc.dg/tree-ssa/pr101335.c

diff --git a/gcc/testsuite/gcc.c-torture/compile/pr100278.c b/gcc/testsuite/gcc.c-torture/compile/pr100278.c
new file mode 100644
index 0000000..4631080
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/compile/pr100278.c
@@ -0,0 +1,15 @@
+
+void a()
+{
+#if defined __s390__
+  register int b asm("r5");
+#elif defined __x86_64__
+  register int b asm("eax");
+#else
+  volatile int b;
+#endif
+  if (b)
+    b = 1;
+  for (; b;)
+    ;
+}
diff --git a/gcc/testsuite/gcc.c-torture/compile/pr101189.c b/gcc/testsuite/gcc.c-torture/compile/pr101189.c
new file mode 100644
index 0000000..ad83d32
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/compile/pr101189.c
@@ -0,0 +1,15 @@
+/* PR tree-optimization/101189  */
+
+static int a, b;
+int main() {
+  int d = 0, e, f = 5;
+  if (a)
+    f = 0;
+  for (; f < 4; f++)
+    ;
+  e = f ^ -f;
+  e && d;
+  if (!e)
+    e || b;
+  return 0;
+}
diff --git a/gcc/testsuite/gcc.c-torture/execute/pr100453.c b/gcc/testsuite/gcc.c-torture/execute/pr100453.c
new file mode 100644
index 0000000..853a892
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/execute/pr100453.c
@@ -0,0 +1,16 @@
+
+struct a {
+  int b : 4;
+} d;
+static int c, e;
+static const struct a f;
+static void g(const struct a h) {
+  for (; c < 1; c++)
+    d = h;
+  e = h.b;
+  c = h.b;
+}
+int main() {
+  g(f);
+  return 0;
+}
diff --git a/gcc/testsuite/gcc.c-torture/execute/pr101335.c b/gcc/testsuite/gcc.c-torture/execute/pr101335.c
new file mode 100644
index 0000000..45a399f
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/execute/pr101335.c
@@ -0,0 +1,15 @@
+
+unsigned a = 0xFFFFFFFF;
+int b;
+int main()
+{
+  int c = ~a;
+  unsigned d = c - 10;
+  if (d > c)
+    c = 20;
+  b = -(c | 0);
+  if (b > -8)
+    __builtin_abort ();
+  return 0;
+}
+
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/pr100278.c b/gcc/testsuite/gcc.dg/tree-ssa/pr100278.c
deleted file mode 100644
index 8d70228..0000000
--- a/gcc/testsuite/gcc.dg/tree-ssa/pr100278.c
+++ /dev/null
@@ -1,17 +0,0 @@
-/* { dg-do compile } */
-/* { dg-options "-O2" } */
-
-void a()
-{
-#if defined __s390__
-  register int b asm("r5");
-#elif defined __x86_64__
-  register int b asm("eax");
-#else
-  volatile int b;
-#endif
-  if (b)
-    b = 1;
-  for (; b;)
-    ;
-}
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/pr100453.c b/gcc/testsuite/gcc.dg/tree-ssa/pr100453.c
deleted file mode 100644
index 0cf0ad2..0000000
--- a/gcc/testsuite/gcc.dg/tree-ssa/pr100453.c
+++ /dev/null
@@ -1,18 +0,0 @@
-/* { dg-do run } */
-/* { dg-options "-O1" } */
-
-struct a {
-  int b : 4;
-} d;
-static int c, e;
-static const struct a f;
-static void g(const struct a h) {
-  for (; c < 1; c++)
-    d = h;
-  e = h.b;
-  c = h.b;
-}
-int main() {
-  g(f);
-  return 0;
-}
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/pr101189.c b/gcc/testsuite/gcc.dg/tree-ssa/pr101189.c
deleted file mode 100644
index 5730708..0000000
--- a/gcc/testsuite/gcc.dg/tree-ssa/pr101189.c
+++ /dev/null
@@ -1,17 +0,0 @@
-/* PR tree-optimization/101189  */
-/* { dg-do compile } */
-/* { dg-options "-O2" } */
-
-static int a, b;
-int main() {
-  int d = 0, e, f = 5;
-  if (a)
-    f = 0;
-  for (; f < 4; f++)
-    ;
-  e = f ^ -f;
-  e && d;
-  if (!e)
-    e || b;
-  return 0;
-}
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/pr101335.c b/gcc/testsuite/gcc.dg/tree-ssa/pr101335.c
deleted file mode 100644
index 921362c..0000000
--- a/gcc/testsuite/gcc.dg/tree-ssa/pr101335.c
+++ /dev/null
@@ -1,17 +0,0 @@
-/* { dg-do run } */
-/* { dg-options "-O2" } */
-
-unsigned a = 0xFFFFFFFF;
-int b;
-int main()
-{
-  int c = ~a;
-  unsigned d = c - 10;
-  if (d > c)
-    c = 20;
-  b = -(c | 0);
-  if (b > -8)
-    __builtin_abort ();
-  return 0;
-}
-
-- 
1.8.3.1



More information about the Gcc-patches mailing list