OSDN Git Service

ec1b73302187c88c870b61c7ae300c59b7fd02fb
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / gcc.c-torture / execute / ieee / ieee.exp
1 #
2 # Expect driver script for GCC Regression Tests
3 #   Copyright (C) 1993, 1996, 2001, 2005 Free Software Foundation
4 #
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.
9 #
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.
14 #
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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 
18 #
19 # Written by Jeffrey Wheat (cassidy@cygnus.com)
20 #
21
22 # Load support procs.
23 load_lib gcc-dg.exp
24
25 # These tests come from Torbjorn Granlund's (tege@cygnus.com)
26 # C torture test suite, and other contributors.
27
28 # Disable tests on machines with no hardware support for IEEE arithmetic.
29 if { [istarget "vax-*-*"] || [ istarget "powerpc-*-*spe"] } { return }
30
31 if $tracelevel then {
32     strace $tracelevel
33 }
34
35 set additional_flags ""
36
37 # We must use -ffloat-store/-mieee to ensure that excess precision on some
38 # machines does not cause problems
39 if [istarget "i\[34567\]86-*-*"] then {
40   lappend additional_flags "-ffloat-store"
41 }
42 if { [istarget "x86_64-*-*"] && [check_effective_target_ilp32] } then {
43   lappend additional_flags "-ffloat-store"
44 }
45 if [istarget "m68k-*-*"] then {
46   lappend additional_flags "-ffloat-store"
47 }
48 if { [istarget "alpha*-*-*"] 
49      || [istarget "sh*-*-*"] } then {
50   lappend additional_flags "-mieee"
51 }
52
53 # load support procs
54 load_lib c-torture.exp
55
56 # initialize harness
57 gcc_init
58
59 #
60 # main test loop
61 #
62
63 foreach src [lsort [glob -nocomplain $srcdir/$subdir/*.c]] {
64     # If we're only testing specific files and this isn't one of them, skip it.
65     if ![runtest_file_p $runtests $src] then {
66         continue
67     }
68
69     c-torture-execute $src $additional_flags
70 }
71
72 # All done.
73 gcc_finish