]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
This commit was manufactured by cvs2svn to create branch
authorNo Author <no-author@gcc.gnu.org>
Thu, 27 Jan 2005 02:02:06 +0000 (02:02 +0000)
committerNo Author <no-author@gcc.gnu.org>
Thu, 27 Jan 2005 02:02:06 +0000 (02:02 +0000)
'gcc-3_4-branch'.

From-SVN: r94304

gcc/testsuite/gcc.c-torture/execute/20050124-1.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/20041216-1.c [new file with mode: 0644]

diff --git a/gcc/testsuite/gcc.c-torture/execute/20050124-1.c b/gcc/testsuite/gcc.c-torture/execute/20050124-1.c
new file mode 100644 (file)
index 0000000..9d039ef
--- /dev/null
@@ -0,0 +1,41 @@
+/* PR rtl-optimization/19579 */
+
+extern void abort (void);
+
+int
+foo (int i, int j)
+{
+  int k = i + 1;
+
+  if (j)
+    {
+      if (k > 0)
+       k++;
+      else if (k < 0)
+       k--;
+    }
+
+  return k;
+}
+
+int
+main (void)
+{
+  if (foo (-2, 0) != -1)
+    abort ();
+  if (foo (-1, 0) != 0)
+    abort ();
+  if (foo (0, 0) != 1)
+    abort ();
+  if (foo (1, 0) != 2)
+    abort ();
+  if (foo (-2, 1) != -2)
+    abort ();
+  if (foo (-1, 1) != 0)
+    abort ();
+  if (foo (0, 1) != 2)
+    abort ();
+  if (foo (1, 1) != 3)
+    abort ();
+  return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/20041216-1.c b/gcc/testsuite/gcc.dg/20041216-1.c
new file mode 100644 (file)
index 0000000..3f892a2
--- /dev/null
@@ -0,0 +1,23 @@
+/* This test case would get an unresolved symbol during link
+   because stabs referred to an optimized-away literal pool
+   entry.  */
+
+/* { dg-do run { target s390*-*-* } } */
+/* { dg-options "-O2 -fno-omit-frame-pointer -gstabs" } */
+
+int main (void)
+{
+  static char buf[4096];
+  char *p;
+
+  do
+    {
+      p = buf;
+      asm volatile ("" : : : "memory", "0", "1", "2", "3", "4", "5", "6",
+                                      "7", "8", "9", "10", "12");
+    }
+  while (*p);
+
+  return 0;
+}
+