diff options
author | James E Wilson <wilson@specifixinc.com> | 2005-01-14 11:45:23 -0800 |
---|---|---|
committer | Jim Wilson <wilson@gcc.gnu.org> | 2005-01-14 11:45:23 -0800 |
commit | 66f9a6de4ccd427bcbec14104465b1f0efa7c10f (patch) | |
tree | 633174f6330af85e4d1d39cbd597887739fbd3c4 | |
parent | 05075d4e465d3b1b55e038ff9f6e3086e158846f (diff) | |
download | gcc-66f9a6de4ccd427bcbec14104465b1f0efa7c10f.zip gcc-66f9a6de4ccd427bcbec14104465b1f0efa7c10f.tar.gz gcc-66f9a6de4ccd427bcbec14104465b1f0efa7c10f.tar.bz2 |
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.
From-SVN: r93660
-rw-r--r-- | gcc/testsuite/ChangeLog | 7 | ||||
-rw-r--r-- | gcc/testsuite/gcc.target/ia64/ia64.exp | 41 | ||||
-rw-r--r-- | gcc/testsuite/gcc.target/ia64/sibcall-unwind-1.c | 10 | ||||
-rw-r--r-- | gcc/testsuite/gcc.target/ia64/sibcall-unwind-2.c | 11 |
4 files changed, 69 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index f233054..b0e7898 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 0000000..fef778d --- /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 0000000..4711791 --- /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 0000000..0ae31ae --- /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); +} |