summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorwilson <wilson@138bc75d-0d04-0410-961f-82ee72b054a4>2005-01-14 19:45:23 +0000
committerwilson <wilson@138bc75d-0d04-0410-961f-82ee72b054a4>2005-01-14 19:45:23 +0000
commitb979cffaad9df7268caaa1883413701f86eb969d (patch)
tree633174f6330af85e4d1d39cbd597887739fbd3c4
parenta422e68e6d82a613cbcabbee84336b0325c71fa8 (diff)
downloadgcc-b979cffaad9df7268caaa1883413701f86eb969d.tar.gz
Testcases for sibcall unwind info problems.
PR target/13158 * gcc.target/ia64/sibcall-unwind-1.c: New test. PR target/18987 * gcc.target/ia64/sibcall-unwind-2.c: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@93660 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/testsuite/ChangeLog7
-rw-r--r--gcc/testsuite/gcc.target/ia64/ia64.exp41
-rw-r--r--gcc/testsuite/gcc.target/ia64/sibcall-unwind-1.c10
-rw-r--r--gcc/testsuite/gcc.target/ia64/sibcall-unwind-2.c11
4 files changed, 69 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index f233054980f..b0e7898293e 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -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
index 00000000000..fef778dd6a1
--- /dev/null
+++ b/gcc/testsuite/gcc.target/ia64/ia64.exp
@@ -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
index 00000000000..47117911934
--- /dev/null
+++ b/gcc/testsuite/gcc.target/ia64/sibcall-unwind-1.c
@@ -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
index 00000000000..0ae31ae5bf4
--- /dev/null
+++ b/gcc/testsuite/gcc.target/ia64/sibcall-unwind-2.c
@@ -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);
+}