2003-12-26 Guilhem Lavaux <guilhem@kaffe.org>
[official-gcc.git] / gcc / testsuite / gcc.c-torture / execute / ieee / ieee.exp
blob6b23a4ec5e2360b978005fd2a0b9d51ff3ab58a0
2 # Expect driver script for GCC Regression Tests
3 # Copyright (C) 1993, 1996, 2001 Free Software Foundation
5 # This file is free software; you can redistribute it and/or modify
6 # it under the terms of the GNU General Public License as published by
7 # the Free Software Foundation; either version 2 of the License, or
8 # (at your option) any later version.
10 # This program is distributed in the hope that it will be useful,
11 # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 # GNU General Public License for more details.
15 # You should have received a copy of the GNU General Public License
16 # along with this program; if not, write to the Free Software
17 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
19 # Written by Jeffrey Wheat (cassidy@cygnus.com)
23 # These tests come from Torbjorn Granlund's (tege@cygnus.com)
24 # C torture test suite, and other contributors.
27 # VAX does not have hardware support for IEEE arithmetic.
28 if { [istarget "vax-*-*"] } { return }
30 if $tracelevel then {
31 strace $tracelevel
34 set additional_flags "";
36 # We must use -ffloat-store/-mieee to ensure that excess precision on some
37 # machines does not cause problems
38 if [istarget "i\[34567\]86-*-*"] then {
39 lappend additional_flags "-ffloat-store"
41 if [istarget "m68k-*-*"] then {
42 lappend additional_flags "-ffloat-store"
44 if { [istarget "alpha*-*-*"]
45 || [istarget "sh*-*-*"] } then {
46 lappend additional_flags "-mieee"
49 # load support procs
50 load_lib c-torture.exp
52 # initialize harness
53 gcc_init
56 # main test loop
59 foreach src [lsort [glob -nocomplain $srcdir/$subdir/*.c]] {
60 # If we're only testing specific files and this isn't one of them, skip it.
61 if ![runtest_file_p $runtests $src] then {
62 continue
65 c-torture-execute $src $additional_flags
68 # All done.
69 gcc_finish