Testcases for sibcall unwind info problems.
authorJames E Wilson <wilson@specifixinc.com>
Fri, 14 Jan 2005 19:45:23 +0000 (11:45 -0800)
committerJim Wilson <wilson@gcc.gnu.org>
Fri, 14 Jan 2005 19:45:23 +0000 (11:45 -0800)
PR target/13158
* gcc.target/ia64/sibcall-unwind-1.c: New test.
PR target/18987
* gcc.target/ia64/sibcall-unwind-2.c: New test.

From-SVN: r93660

gcc/testsuite/ChangeLog
gcc/testsuite/gcc.target/ia64/ia64.exp [new file with mode: 0644]
gcc/testsuite/gcc.target/ia64/sibcall-unwind-1.c [new file with mode: 0644]
gcc/testsuite/gcc.target/ia64/sibcall-unwind-2.c [new file with mode: 0644]

index f233054..b0e7898 100644 (file)
@@ -1,3 +1,10 @@
+2005-01-14  James E. Wilson  <wilson@specifixinc.com>
+
+       PR target/13158
+       * gcc.target/ia64/sibcall-unwind-1.c: New test.
+       PR target/18987
+       * gcc.target/ia64/sibcall-unwind-2.c: New test.
+
 2005-01-14  Steven G. Kargl  <kargls@comcast.net>
 
        * gfortran.dg/select_1.f90: New test.
diff --git a/gcc/testsuite/gcc.target/ia64/ia64.exp b/gcc/testsuite/gcc.target/ia64/ia64.exp
new file mode 100644 (file)
index 0000000..fef778d
--- /dev/null
@@ -0,0 +1,41 @@
+#   Copyright (C) 1997 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+# 
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+# 
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  
+
+# GCC testsuite that uses the `dg.exp' driver.
+
+# Exit immediately if this isn't an IA-64 target.
+if ![istarget ia64*-*-*] then {
+  return
+}
+
+# Load support procs.
+load_lib gcc-dg.exp
+
+# If a testcase doesn't have special options, use these.
+global DEFAULT_CFLAGS
+if ![info exists DEFAULT_CFLAGS] then {
+    set DEFAULT_CFLAGS " -ansi -pedantic-errors"
+}
+
+# Initialize `dg'.
+dg-init
+
+# Main loop.
+dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/*.\[cS\]]] \
+       "" $DEFAULT_CFLAGS
+
+# All done.
+dg-finish
diff --git a/gcc/testsuite/gcc.target/ia64/sibcall-unwind-1.c b/gcc/testsuite/gcc.target/ia64/sibcall-unwind-1.c
new file mode 100644 (file)
index 0000000..4711791
--- /dev/null
@@ -0,0 +1,10 @@
+/* PR 13158.  Emit ".restore sp" for a sibcall.  */
+/* { dg-do compile } */
+/* { dg-options "-O2 -w" } */
+/* { dg-final { scan-assembler-times "\\.restore sp" 1 } } */
+
+static void do_date (char *);  
+void rfc822_date (char *date)  
+{  
+  do_date (date);
+}
diff --git a/gcc/testsuite/gcc.target/ia64/sibcall-unwind-2.c b/gcc/testsuite/gcc.target/ia64/sibcall-unwind-2.c
new file mode 100644 (file)
index 0000000..0ae31ae
--- /dev/null
@@ -0,0 +1,11 @@
+/* PR 18987.  This caused an assembler error because we emitted ".restore sp"
+   twice.  */
+/* { dg-do compile } */
+/* { dg-options "-O2 -fno-omit-frame-pointer -w" } */
+/* { dg-final { scan-assembler-times "\\.restore sp" 1 } } */
+
+static void do_date (char *);  
+void rfc822_date (char *date)  
+{  
+  do_date (date);
+}