2008-05-30 Vladimir Makarov <vmakarov@redhat.com>
[official-gcc.git] / gcc / testsuite / gcc.c-torture / execute / ieee / ieee.exp
blob3d7e56c6b30fdb762a7a354d6fe35b27407b7245
2 # Expect driver script for GCC Regression Tests
3 # Copyright (C) 1993, 1996, 2001, 2005, 2007 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 3 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 GCC; see the file COPYING3. If not see
17 # <http://www.gnu.org/licenses/>.
19 # Written by Jeffrey Wheat (cassidy@cygnus.com)
22 # Load support procs.
23 load_lib gcc-dg.exp
24 load_lib torture-options.exp
26 # These tests come from Torbjorn Granlund's (tege@cygnus.com)
27 # C torture test suite, and other contributors.
29 # Disable tests on machines with no hardware support for IEEE arithmetic.
30 if { [istarget "vax-*-*"] || [ istarget "powerpc-*-*spe"] } { return }
32 if $tracelevel then {
33 strace $tracelevel
36 torture-init
37 set-torture-options $C_TORTURE_OPTIONS
39 set additional_flags ""
41 # We must use -ffloat-store/-mieee to ensure that excess precision on some
42 # machines does not cause problems
43 if [istarget "i\[34567\]86-*-*"] then {
44 lappend additional_flags "-ffloat-store"
46 if { [istarget "x86_64-*-*"] && [check_effective_target_ilp32] } then {
47 lappend additional_flags "-ffloat-store"
49 if [istarget "m68k-*-*"] then {
50 lappend additional_flags "-ffloat-store"
52 if { [istarget "alpha*-*-*"]
53 || [istarget "sh*-*-*"] } then {
54 lappend additional_flags "-mieee"
57 # load support procs
58 load_lib c-torture.exp
60 # initialize harness
61 gcc_init
64 # main test loop
67 foreach src [lsort [glob -nocomplain $srcdir/$subdir/*.c]] {
68 # If we're only testing specific files and this isn't one of them, skip it.
69 if ![runtest_file_p $runtests $src] then {
70 continue
73 c-torture-execute $src $additional_flags
76 # All done.
77 torture-finish
78 gcc_finish