diff options
author | zack <zack@138bc75d-0d04-0410-961f-82ee72b054a4> | 2001-02-20 05:49:06 +0000 |
---|---|---|
committer | zack <zack@138bc75d-0d04-0410-961f-82ee72b054a4> | 2001-02-20 05:49:06 +0000 |
commit | 3915b59eb73c81cd06e1c52d275fdecf3151a453 (patch) | |
tree | 51e806341a185dae0e1fc20ec036ecd1ec7fa9be /gcc/testsuite/g77.dg | |
parent | 66c4386e4c27657eceb722e2fd79b7911d48a7f2 (diff) | |
download | gcc-3915b59eb73c81cd06e1c52d275fdecf3151a453.tar.gz |
* sibcall.c (skip_copy_to_return_value): Call
identify_call_return_value here, and return orig_insn if it
returns zero. Hardret and softret arguments now unnecessary.
(call_ends_block_p): Don't call identify_call_return_value here.
* ggc-common.c (ggc_mark_rtx_children): No need to mark 'S' or
's' slots in RTXen.
* ggc-page.c, ggc-simple.c (ggc_mark_if_gcable): Delete function.
* ggc.h (ggc_mark_if_gcable): Delete prototype.
testsuite:
* g77.dg: New directory.
* g77.dg/20010216-1.f: New test case.
* g77.dg/dg.exp: New driver.
* lib/g77-dg.exp: New driver library.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@39916 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/testsuite/g77.dg')
-rw-r--r-- | gcc/testsuite/g77.dg/20010216-1.f | 51 | ||||
-rw-r--r-- | gcc/testsuite/g77.dg/dg.exp | 36 |
2 files changed, 87 insertions, 0 deletions
diff --git a/gcc/testsuite/g77.dg/20010216-1.f b/gcc/testsuite/g77.dg/20010216-1.f new file mode 100644 index 00000000000..150dc9f016a --- /dev/null +++ b/gcc/testsuite/g77.dg/20010216-1.f @@ -0,0 +1,51 @@ +C Test for bug in reg-stack handling conditional moves. +C Reported by Tim Prince <tprince@computer.org> +C +C { dg-do run { target "i[6789]86-*-*" } } +C { dg-options "-ffast-math -march=pentiumpro" } + + double precision function foo(x, y) + implicit none + double precision x, y + double precision a, b, c, d + if (x /= y) then + if (x * y >= 0) then + a = abs(x) + b = abs(y) + c = max(a, b) + d = min(a, b) + foo = 1 - d/c + else + foo = 1 + end if + else + foo = 0 + end if + end + + program test + implicit none + + integer ntests + parameter (ntests=7) + double precision tolerance + parameter (tolerance=1.0D-6) + +C Each column is a pair of values to feed to foo, +C and its expected return value. + double precision a(ntests) /1, -23, -1, 1, 9, 10, -9/ + double precision b(ntests) /1, -23, 12, -12, 10, 9, -10/ + double precision x(ntests) /0, 0, 1, 1, 0.1, 0.1, 0.1/ + + double precision foo + double precision result + integer i + + do i = 1, ntests + result = foo(a(i), b(i)) + if (abs(result - x(i)) > tolerance) then + print *, i, a(i), b(i), x(i), result + call abort + end if + end do + end diff --git a/gcc/testsuite/g77.dg/dg.exp b/gcc/testsuite/g77.dg/dg.exp new file mode 100644 index 00000000000..446166c49db --- /dev/null +++ b/gcc/testsuite/g77.dg/dg.exp @@ -0,0 +1,36 @@ +# 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. + +# Load support procs. +load_lib g77-dg.exp + +# If a testcase doesn't have special options, use these. +global DEFAULT_FFLAGS +if ![info exists DEFAULT_FFLAGS] then { + set DEFAULT_FFLAGS " -pedantic-errors" +} + +# Initialize `dg'. +dg-init + +# Main loop. +g77-dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/*.f]] \ + $DEFAULT_FFLAGS + +# All done. +dg-finish |