diff options
author | Zack Weinberg <zack@wolery.cumb.org> | 2000-06-29 03:10:01 +0000 |
---|---|---|
committer | Zack Weinberg <zack@gcc.gnu.org> | 2000-06-29 03:10:01 +0000 |
commit | 3be6ce4646b9ba06cd6b41804925a93ec5b33583 (patch) | |
tree | bf592ea9ef8fe4cce25dd21e3a2267e5658d7371 | |
parent | 628f05b4c155039e5ebf5f85bb71bb75fcae63af (diff) | |
download | gcc-3be6ce4646b9ba06cd6b41804925a93ec5b33583.zip gcc-3be6ce4646b9ba06cd6b41804925a93ec5b33583.tar.gz gcc-3be6ce4646b9ba06cd6b41804925a93ec5b33583.tar.bz2 |
Rearrange lots of files...
Rearrange lots of files, removing entirely the
gcc.c-torture/special, gcc.c-torture/code-quality, and gcc.failure
directories.
* Deleted files:
gcc.c-torture/code_quality/code_quality.exp
gcc.c-torture/special/special.exp
gcc.failure/failure.exp
gcc.failure/940409-1.x
gcc.c-torture/compile/961203-1.x
* New files:
gcc.misc-tests/linkage.exp
gcc.c-torture/execute/920730-1t.c
gcc.c-torture/execute/920730-1t.x
gcc.c-torture/compile/920520-1.x
gcc.c-torture/compile/920521-1.x
gcc.c-torture/compile/981006-1.x
gcc.c-torture/execute/eeprof-1.x
* Moved files (possibly with modifications to fit a new harness):
Old name New name
gcc.c-torture/code_quality/920608-1.c gcc.c-torture/compile/920608-1.c
gcc.c-torture/special/920413-1.c gcc.dg/920413-1.c
gcc.c-torture/special/920520-1.c gcc.c-torture/compile/920520-1.c
gcc.c-torture/special/920521-1.c gcc.c-torture/compile/920521-1.c
gcc.c-torture/special/920717-x.c gcc.misc-tests/linkage-x.c
gcc.c-torture/special/920717-y.c gcc.misc-tests/linkage-y.c
gcc.c-torture/special/920730-1.c gcc.c-torture/execute/920730-1.c
gcc.c-torture/special/930510-1.c gcc.dg/cpp/19930510-1.c
gcc.c-torture/special/951130-1.c gcc.dg/951130-1.c
gcc.c-torture/special/960224-1.c gcc.dg/cpp/19960224-1.c
gcc.c-torture/special/960224-2.c gcc.dg/cpp/19960224-2.c
gcc.c-torture/special/981006-1.c gcc.c-torture/compile/981006-1.c
gcc.c-torture/special/eeprof-1.c gcc.c-torture/execute/eeprof-1.c
gcc.failure/940409-1.c gcc.dg/940409-1.c
From-SVN: r34775
30 files changed, 141 insertions, 236 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 6901218..3920223 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,5 +1,44 @@ 2000-06-28 Zack Weinberg <zack@wolery.cumb.org> + Rearrange lots of files, removing entirely the + gcc.c-torture/special, gcc.c-torture/code-quality, and gcc.failure + directories. + + * Deleted files: + gcc.c-torture/code_quality/code_quality.exp + gcc.c-torture/special/special.exp + gcc.failure/failure.exp + gcc.failure/940409-1.x + gcc.c-torture/compile/961203-1.x + + * New files: + gcc.misc-tests/linkage.exp + gcc.c-torture/execute/920730-1t.c + gcc.c-torture/execute/920730-1t.x + gcc.c-torture/compile/920520-1.x + gcc.c-torture/compile/920521-1.x + gcc.c-torture/compile/981006-1.x + gcc.c-torture/execute/eeprof-1.x + + * Moved files (possibly with modifications to fit a new harness): + Old name New name + gcc.c-torture/code_quality/920608-1.c gcc.c-torture/compile/920608-1.c + gcc.c-torture/special/920413-1.c gcc.dg/920413-1.c + gcc.c-torture/special/920520-1.c gcc.c-torture/compile/920520-1.c + gcc.c-torture/special/920521-1.c gcc.c-torture/compile/920521-1.c + gcc.c-torture/special/920717-x.c gcc.misc-tests/linkage-x.c + gcc.c-torture/special/920717-y.c gcc.misc-tests/linkage-y.c + gcc.c-torture/special/920730-1.c gcc.c-torture/execute/920730-1.c + gcc.c-torture/special/930510-1.c gcc.dg/cpp/19930510-1.c + gcc.c-torture/special/951130-1.c gcc.dg/951130-1.c + gcc.c-torture/special/960224-1.c gcc.dg/cpp/19960224-1.c + gcc.c-torture/special/960224-2.c gcc.dg/cpp/19960224-2.c + gcc.c-torture/special/981006-1.c gcc.c-torture/compile/981006-1.c + gcc.c-torture/special/eeprof-1.c gcc.c-torture/execute/eeprof-1.c + gcc.failure/940409-1.c gcc.dg/940409-1.c + +2000-06-28 Zack Weinberg <zack@wolery.cumb.org> + * c-torture/compile/961203-1.x: Delete. * gcc.misc-tests/acker1.c: Report failure. Use return from main, diff --git a/gcc/testsuite/gcc.c-torture/code_quality/code_quality.exp b/gcc/testsuite/gcc.c-torture/code_quality/code_quality.exp deleted file mode 100644 index b8b72ea..0000000 --- a/gcc/testsuite/gcc.c-torture/code_quality/code_quality.exp +++ /dev/null @@ -1,55 +0,0 @@ -# -# Expect driver script for GCC Regression Tests -# Copyright (C) 1993, 1997 Free Software Foundation -# -# This file 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., 675 Mass Ave, Cambridge, MA 02139, USA. -# -# Written by Jeffrey Wheat (cassidy@cygnus.com) -# - -# -# These tests come from Torbjorn Granlund's (tege@cygnus.com) -# C torture test suite, and other contributors. -# - -if $tracelevel then { - strace $tracelevel -} - -# load support procs -load_lib c-torture.exp - -# -# This loop will run c-torture on any *.c file found in this directory. -# If a *.c has a corresponding *.exp file, then the test is skipped as -# as the *.exp will drive the test itself. I did things this way so that -# generic tests did not need a seperate .exp for it. Only the tests that -# required unique options would need it's own .exp file. -# - -foreach testcase [glob -nocomplain $srcdir/$subdir/*.c] { - if [file exists [file rootname $testcase].exp] then { - verbose "INFO:\"[file rootname $testcase].exp\" exists, skipping test" 3 - continue - } - - # If we're only testing specific files and this isn't one of them, skip it. - if ![runtest_file_p $runtests $testcase] then { - continue - } - - c-torture $testcase -} - diff --git a/gcc/testsuite/gcc.c-torture/special/920520-1.c b/gcc/testsuite/gcc.c-torture/compile/920520-1.c index 6b1cd7b..6b1cd7b 100644 --- a/gcc/testsuite/gcc.c-torture/special/920520-1.c +++ b/gcc/testsuite/gcc.c-torture/compile/920520-1.c diff --git a/gcc/testsuite/gcc.c-torture/compile/920520-1.x b/gcc/testsuite/gcc.c-torture/compile/920520-1.x new file mode 100644 index 0000000..4cfce33 --- /dev/null +++ b/gcc/testsuite/gcc.c-torture/compile/920520-1.x @@ -0,0 +1,2 @@ +set options "-S" +return 0 diff --git a/gcc/testsuite/gcc.c-torture/special/920521-1.c b/gcc/testsuite/gcc.c-torture/compile/920521-1.c index 95b9497..95b9497 100644 --- a/gcc/testsuite/gcc.c-torture/special/920521-1.c +++ b/gcc/testsuite/gcc.c-torture/compile/920521-1.c diff --git a/gcc/testsuite/gcc.c-torture/compile/920521-1.x b/gcc/testsuite/gcc.c-torture/compile/920521-1.x new file mode 100644 index 0000000..4cfce33 --- /dev/null +++ b/gcc/testsuite/gcc.c-torture/compile/920521-1.x @@ -0,0 +1,2 @@ +set options "-S" +return 0 diff --git a/gcc/testsuite/gcc.c-torture/code_quality/920608-1.c b/gcc/testsuite/gcc.c-torture/compile/920608-1.c index cae1978..cae1978 100644 --- a/gcc/testsuite/gcc.c-torture/code_quality/920608-1.c +++ b/gcc/testsuite/gcc.c-torture/compile/920608-1.c diff --git a/gcc/testsuite/gcc.c-torture/special/981006-1.c b/gcc/testsuite/gcc.c-torture/compile/981006-1.c index 6af6d9a..6af6d9a 100644 --- a/gcc/testsuite/gcc.c-torture/special/981006-1.c +++ b/gcc/testsuite/gcc.c-torture/compile/981006-1.c diff --git a/gcc/testsuite/gcc.c-torture/compile/981006-1.x b/gcc/testsuite/gcc.c-torture/compile/981006-1.x new file mode 100644 index 0000000..5c8d9f0 --- /dev/null +++ b/gcc/testsuite/gcc.c-torture/compile/981006-1.x @@ -0,0 +1,12 @@ +# For MIPS at least, pic is needed to trigger the problem. +if { [istarget rs6000-*-aix*] + || [istarget powerpc*-*-aix*] + || [istarget arm*-*-*] + || [istarget strongarm*-*-*] + || [istarget fr30-*-*] +} { + set options "-Wuninitialized -Werror" +} else { + set options "-Wuninitialized -Werror -fpic" +} +return 0 diff --git a/gcc/testsuite/gcc.c-torture/special/920730-1.c b/gcc/testsuite/gcc.c-torture/execute/920730-1.c index d97d873..d97d873 100644 --- a/gcc/testsuite/gcc.c-torture/special/920730-1.c +++ b/gcc/testsuite/gcc.c-torture/execute/920730-1.c diff --git a/gcc/testsuite/gcc.c-torture/execute/920730-1t.c b/gcc/testsuite/gcc.c-torture/execute/920730-1t.c new file mode 100644 index 0000000..bc5e413 --- /dev/null +++ b/gcc/testsuite/gcc.c-torture/execute/920730-1t.c @@ -0,0 +1,3 @@ +/* This is just 920730-1.c compiled with -traditional. + See 920730-1t.x. */ +#include "920730-1.c" diff --git a/gcc/testsuite/gcc.c-torture/execute/920730-1t.x b/gcc/testsuite/gcc.c-torture/execute/920730-1t.x new file mode 100644 index 0000000..cf05b31 --- /dev/null +++ b/gcc/testsuite/gcc.c-torture/execute/920730-1t.x @@ -0,0 +1,2 @@ +set additional_flags "-traditional" +return 0 diff --git a/gcc/testsuite/gcc.c-torture/special/eeprof-1.c b/gcc/testsuite/gcc.c-torture/execute/eeprof-1.c index 6dad7ec..6dad7ec 100644 --- a/gcc/testsuite/gcc.c-torture/special/eeprof-1.c +++ b/gcc/testsuite/gcc.c-torture/execute/eeprof-1.c diff --git a/gcc/testsuite/gcc.c-torture/execute/eeprof-1.x b/gcc/testsuite/gcc.c-torture/execute/eeprof-1.x new file mode 100644 index 0000000..0098d56 --- /dev/null +++ b/gcc/testsuite/gcc.c-torture/execute/eeprof-1.x @@ -0,0 +1,2 @@ +set additional_flags "-finstrument-functions" +return 0 diff --git a/gcc/testsuite/gcc.c-torture/special/920413-1.c b/gcc/testsuite/gcc.c-torture/special/920413-1.c deleted file mode 100644 index a3e0613..0000000 --- a/gcc/testsuite/gcc.c-torture/special/920413-1.c +++ /dev/null @@ -1 +0,0 @@ -x(b){unsigned long c;c=4294967295U/(unsigned long)b;} diff --git a/gcc/testsuite/gcc.c-torture/special/951130-1.c b/gcc/testsuite/gcc.c-torture/special/951130-1.c deleted file mode 100644 index c06ba07..0000000 --- a/gcc/testsuite/gcc.c-torture/special/951130-1.c +++ /dev/null @@ -1,2 +0,0 @@ -unsigned long long x = -(unsigned long long)(-(long long)(((unsigned long -long)0 - 1) >> 1) - 1); diff --git a/gcc/testsuite/gcc.c-torture/special/960224-2.c b/gcc/testsuite/gcc.c-torture/special/960224-2.c deleted file mode 100644 index 3d69694..0000000 --- a/gcc/testsuite/gcc.c-torture/special/960224-2.c +++ /dev/null @@ -1,4 +0,0 @@ -#if 0 -#if 0 -#endif / -#endif diff --git a/gcc/testsuite/gcc.c-torture/special/special.exp b/gcc/testsuite/gcc.c-torture/special/special.exp deleted file mode 100644 index cc5b812..0000000 --- a/gcc/testsuite/gcc.c-torture/special/special.exp +++ /dev/null @@ -1,107 +0,0 @@ -# Copyright (C) 1988, 90-96, 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., 675 Mass Ave, Cambridge, MA 02139, USA. - -# Please email any bugs, comments, and/or additions to this file to: -# bug-gcc@prep.ai.mit.edu - -# This file was written by Rob Savoye. (rob@cygnus.com) - -# -# These tests come from Torbjorn Granlund (tege@cygnus.com) -# C torture test suite. -# - -if $tracelevel then { - strace $tracelevel -} - -# load support procs -load_lib c-torture.exp -load_lib gcc-dg.exp - -################## ADD NEXT CASE HERE (NOT AT THE END) ################## - -# 981006-1 -# For MIPS at least, pic is needed to trigger the problem. -dg-init -if { [istarget rs6000-*-aix*] - || [istarget powerpc*-*-aix*] - || [istarget arm*-*-*] - || [istarget strongarm*-*-*] - || [istarget fr30-*-*] -} { - set extra_flags "" -} else { - set extra_flags "-fpic" -} -dg-runtest $srcdir/$subdir/981006-1.c "-Wuninitialized -O2 $extra_flags" "" -dg-finish - -# 920521-1 -c-torture 920521-1.c "-S" - -# 920520-1 -c-torture 920520-1.c "-S" - -# 920717-1 -if [isnative] then { - set lines [gcc_target_compile "$srcdir/$subdir/920717-x.c" "920717-x.o" object {additional_flags="-w"}] - if ![string match "" $lines] then { - fail "920717-x.c" - } else { - # This is a completely bogus test. Sorry. - catch exec "rm -f 920717-y.o" - send_log "cc -c $srcdir/$subdir/920717-y.c 2>/dev/null >/dev/null\n" - catch exec "cc -c $srcdir/$subdir/920717-y.c 2>/dev/null >/dev/null" - if ![file exists "920717-y.o"] then { - send_log "c89 -c $srcdir/$subdir/920717-y.c 2>/dev/null >/dev/null\n" - catch exec "c89 -c $srcdir/$subdir/920717-y.c 2>/dev/null >/dev/null" - } - if [file exists "920717-y.o"] then { - set lines [gcc_target_compile "920717-y.o x.o" "x" executable ""] - if [string match "" $lines] then { - pass "920717-1.c" - } else { - fail "920717-1.c" - } - } - } -} - -# 920730-1 -if [isnative] then { - c-torture "920730-1.c" - c-torture "920730-1.c" "-traditional" -} - -# 920413-1 -c-torture 920413-1.c "-Wtraditional" - -# 930510-1 -dg-init -dg-runtest $srcdir/$subdir/930510-1.c "" "" -dg-finish - -# 951130-1 -c-torture 951130-1.c "-Werror" - -# 960224-1 -c-torture 960224-1.c "-E -ansi -pedantic-errors" - -# 960224-2 -#c-torture 960224-2.c "-E -ansi -pedantic-errors" - -c-torture-execute $srcdir/$subdir/eeprof-1.c "-finstrument-functions" diff --git a/gcc/testsuite/gcc.dg/920413-1.c b/gcc/testsuite/gcc.dg/920413-1.c new file mode 100644 index 0000000..db6bd08 --- /dev/null +++ b/gcc/testsuite/gcc.dg/920413-1.c @@ -0,0 +1,10 @@ +/* { dg-do compile } */ +/* { dg-options "-Wtraditional" } */ + +int +x (b) +{ + return + 4294967295U /* { dg-warning "width of integer constant may change" } */ + / (unsigned long) b; +} diff --git a/gcc/testsuite/gcc.dg/940409-1.c b/gcc/testsuite/gcc.dg/940409-1.c new file mode 100644 index 0000000..e5049d9 --- /dev/null +++ b/gcc/testsuite/gcc.dg/940409-1.c @@ -0,0 +1,8 @@ +/* GCC should allow struct S to be in a register, but it doesn't. This is + an obscure corner case, hasn't worked since 1994, and we don't expect it + to work anytime soon, hence XFAIL. */ +/* { dg-do compile } */ + +struct S { volatile int field; }; +int f (register struct S arg); /* { dg-bogus "volatile field" "with arg" { xfail *-*-* } } */ +int g (register struct S); /* { dg-bogus "volatile field" "no arg" { xfail *-*-* } } */ diff --git a/gcc/testsuite/gcc.dg/951130-1.c b/gcc/testsuite/gcc.dg/951130-1.c new file mode 100644 index 0000000..60013e2 --- /dev/null +++ b/gcc/testsuite/gcc.dg/951130-1.c @@ -0,0 +1,5 @@ +/* { dg-do compile } + { dg-options "-Werror" } */ + +unsigned long long x = -(unsigned long long)(-(long long) + (((unsigned long long)0 - 1) >> 1) - 1); diff --git a/gcc/testsuite/gcc.c-torture/special/930510-1.c b/gcc/testsuite/gcc.dg/cpp/19930510-1.c index 54ad858..724640a 100644 --- a/gcc/testsuite/gcc.c-torture/special/930510-1.c +++ b/gcc/testsuite/gcc.dg/cpp/19930510-1.c @@ -1,3 +1,5 @@ +/* { dg-do compile } */ + #define ugly 3 #ugly "foobar" 3 /* { dg-error "invalid" "invalid directive" } */ int main() { exit (0); } diff --git a/gcc/testsuite/gcc.c-torture/special/960224-1.c b/gcc/testsuite/gcc.dg/cpp/19960224-1.c index de0a6ae..5efc627 100644 --- a/gcc/testsuite/gcc.c-torture/special/960224-1.c +++ b/gcc/testsuite/gcc.dg/cpp/19960224-1.c @@ -1,3 +1,5 @@ +/* { dg-do preprocess } */ + #if 0 #if 0 #endif \ diff --git a/gcc/testsuite/gcc.dg/cpp/19960224-2.c b/gcc/testsuite/gcc.dg/cpp/19960224-2.c new file mode 100644 index 0000000..66d2abc --- /dev/null +++ b/gcc/testsuite/gcc.dg/cpp/19960224-2.c @@ -0,0 +1,6 @@ +/* { dg-do preprocess } */ + +#if 0 +#if 0 +#endif / /* { dg-error "text after #endif" "text after #endif" } */ +#endif diff --git a/gcc/testsuite/gcc.failure/940409-1.c b/gcc/testsuite/gcc.failure/940409-1.c deleted file mode 100644 index 3d5b588..0000000 --- a/gcc/testsuite/gcc.failure/940409-1.c +++ /dev/null @@ -1,3 +0,0 @@ -struct S { volatile int field; }; -int f (register struct S arg); -int g (register struct S); diff --git a/gcc/testsuite/gcc.failure/940409-1.x b/gcc/testsuite/gcc.failure/940409-1.x deleted file mode 100644 index aac0127..0000000 --- a/gcc/testsuite/gcc.failure/940409-1.x +++ /dev/null @@ -1,6 +0,0 @@ -# gcc doesn't handle compile/940409-1.cexp properly, but it's an obscure bug -# so rather than constantly seeing it fail, just record it as expected to -# fail. - -set torture_compile_xfail "*-*-*" -return 0 ;# `0' says we didn't handle the testcase ourselves so continue diff --git a/gcc/testsuite/gcc.failure/failure.exp b/gcc/testsuite/gcc.failure/failure.exp deleted file mode 100644 index bfd9f34..0000000 --- a/gcc/testsuite/gcc.failure/failure.exp +++ /dev/null @@ -1,58 +0,0 @@ -# -# Expect driver script for GCC Regression Tests -# Copyright (C) 1993, 1997 Free Software Foundation -# -# This file 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., 675 Mass Ave, Cambridge, MA 02139, USA. -# -# Written by Jeffrey Wheat (cassidy@cygnus.com) -# - -# -# These tests come from Torbjorn Granlund's (tege@cygnus.com) -# C torture test suite, and other contributors. -# - -if $tracelevel then { - strace $tracelevel -} - -# load support procs -load_lib c-torture.exp - -# -# This loop will run c-torture on any *.c file found in this directory. -# If a *.c has a corresponding *.exp file, then the test is skipped as -# as the *.exp will drive the test itself. I did things this way so that -# generic tests did not need a seperate .exp for it. Only the tests that -# required unique options would need it's own .exp file. -# - -# -# The main logic is in ../lib/c-torture.exp. This was done to eliminate -# redundant code that otherwise lived in each of these driver files. -# -foreach testcase [glob -nocomplain $srcdir/$subdir/*.c] { - - # let c-torture.exp figure out the path. this lets users add new - # special tests without having to remeber to use $srcdir/$subdir - - if [file exists [file rootname $testcase].exp] then { - verbose "INFO:\"[file rootname $testcase].exp\"exists, skipping test" 1 - continue - } else { - c-torture [file tail $testcase] - } -} - diff --git a/gcc/testsuite/gcc.c-torture/special/920717-x.c b/gcc/testsuite/gcc.misc-tests/linkage-x.c index 07601e3..07601e3 100644 --- a/gcc/testsuite/gcc.c-torture/special/920717-x.c +++ b/gcc/testsuite/gcc.misc-tests/linkage-x.c diff --git a/gcc/testsuite/gcc.c-torture/special/920717-y.c b/gcc/testsuite/gcc.misc-tests/linkage-y.c index eaffa5e..eaffa5e 100644 --- a/gcc/testsuite/gcc.c-torture/special/920717-y.c +++ b/gcc/testsuite/gcc.misc-tests/linkage-y.c diff --git a/gcc/testsuite/gcc.misc-tests/linkage.exp b/gcc/testsuite/gcc.misc-tests/linkage.exp new file mode 100644 index 0000000..8389484 --- /dev/null +++ b/gcc/testsuite/gcc.misc-tests/linkage.exp @@ -0,0 +1,46 @@ +# Copyright (C) 1988, 90-96, 1997, 2000 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., 675 Mass Ave, Cambridge, MA 02139, USA. + +# Please email any bugs, comments, and/or additions to this file to: +# bug-gcc@prep.ai.mit.edu + +# This file used to be gcc.c-torture/special/special.exp, which +# was written by Rob Savoye. (rob@cygnus.com) +# All the other tests driven by that file have since been moved elsewhere. + +if [isnative] then { + set lines [gcc_target_compile "$srcdir/$subdir/linkage-x.c" "linkage-x.o" object {additional_flags="-w"}] + if ![string match "" $lines] then { + fail "linkage.c" + } else { + # This is a completely bogus test. Sorry. + catch { exec rm -f linkage-y.o } + send_log "cc -c $srcdir/$subdir/linkage-y.c >&/dev/null\n" + catch { exec cc -c "$srcdir/$subdir/linkage-y.c" >&/dev/null } + if ![file exists "linkage-y.o"] then { + send_log "c89 -c $srcdir/$subdir/linkage-y.c >&/dev/null\n" + catch { exec c89 -c "$srcdir/$subdir/linkage-y.c" >&/dev/null } + } + if [file exists "linkage-y.o"] then { + set lines [gcc_target_compile "linkage-y.o linkage-x.o" "x" executable ""] + if [string match "" $lines] then { + pass "linkage.c" + } else { + fail "linkage.c" + } + } + } +} |