From: James E Wilson Date: Fri, 14 Jan 2005 19:45:23 +0000 (-0800) Subject: Testcases for sibcall unwind info problems. X-Git-Tag: releases/gcc-4.0.0~1573 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=66f9a6de4ccd427bcbec14104465b1f0efa7c10f;p=thirdparty%2Fgcc.git 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 --- diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index f233054980fe..b0e7898293e6 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,10 @@ +2005-01-14 James E. Wilson + + 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 * 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 000000000000..fef778dd6a10 --- /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 000000000000..471179119346 --- /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 000000000000..0ae31ae5bf4a --- /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); +}