1 # Copyright
(C
) 1988, 90-96, 1997 Free Software Foundation
, Inc.
3 # This
program is free software
; you can redistribute it and
/or modify
4 # it under the terms of the GNU General Public License as published by
5 # the Free Software Foundation
; either version
2 of the License
, or
6 #
(at your option
) any later version.
8 # This
program is distributed in the hope that it will be useful
,
9 # but WITHOUT
ANY WARRANTY
; without even the implied warranty of
10 # MERCHANTABILITY or FITNESS
FOR A PARTICULAR PURPOSE. See the
11 # GNU General Public License
for more details.
13 # You should have received a copy of the GNU General Public License
14 # along with this
program; if not
, write to the Free Software
15 # Foundation
, Inc.
, 675 Mass Ave
, Cambridge
, MA
02139, USA.
17 # Please email
any bugs
, comments
, and
/or additions to this file to
:
18 # bug
-gcc@prep.ai.mit.edu
20 # This file was written by Rob Savoye.
(rob@cygnus.com
)
23 # These tests come from Torbjorn Granlund
(tege@cygnus.com
)
24 # C torture test suite.
32 load_lib c
-torture.exp
35 ################## ADD NEXT CASE HERE
(NOT AT THE END
) ##################
38 set lines
[gcc_target_compile $srcdir
/$subdir
/921210-1.c
"" preprocess ""]
39 set lines
[split
[prune_warnings
[prune_gcc_output $lines
]] "\n"]
40 set line
[lindex $lines
[expr
[llength $lines
]-1]]
41 regsub
-all
" " $line "" clean
42 if [expr
[string compare $clean
"(a->f+1)+1"]==0] then {
49 c
-torture
920521-1.c
"-S"
52 c
-torture
920520-1.c
"-S"
56 set lines
[gcc_target_compile
"$srcdir/$subdir/920717-x.c" "920717-x.o" object {additional_flags="-w"}]
57 if ![string match
"" $lines] then {
60 # This is a completely bogus test. Sorry.
61 catch exec
"rm -f 920717-y.o"
62 send_log
"cc -c $srcdir/$subdir/920717-y.c 2>/dev/null >/dev/null\n"
63 catch exec
"cc -c $srcdir/$subdir/920717-y.c 2>/dev/null >/dev/null"
64 if ![file
exists "920717-y.o"] then {
65 send_log
"c89 -c $srcdir/$subdir/920717-y.c 2>/dev/null >/dev/null\n"
66 catch exec
"c89 -c $srcdir/$subdir/920717-y.c 2>/dev/null >/dev/null"
68 if [file
exists "920717-y.o"] then {
69 set lines
[gcc_target_compile
"920717-y.o x.o" "x" executable ""]
70 if [string match
"" $lines] then {
81 c
-torture
"920730-1.c"
82 c
-torture
"920730-1.c" "-traditional"
86 c
-torture
920413-1.c
"-Wtraditional"
90 dg
-runtest $srcdir
/$subdir
/930510-1.c
"" ""
94 c
-torture
951130-1.c
"-Werror"
97 c
-torture
960224-1.c
"-E -ansi -pedantic-errors"
100 #c
-torture
960224-2.c
"-E -ansi -pedantic-errors"