From 3be6ce4646b9ba06cd6b41804925a93ec5b33583 Mon Sep 17 00:00:00 2001 From: Zack Weinberg Date: Thu, 29 Jun 2000 03:10:01 +0000 Subject: [PATCH] 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 --- gcc/testsuite/ChangeLog | 39 +++++++ .../code_quality/code_quality.exp | 55 --------- .../{special => compile}/920520-1.c | 0 .../gcc.c-torture/compile/920520-1.x | 2 + .../{special => compile}/920521-1.c | 0 .../gcc.c-torture/compile/920521-1.x | 2 + .../{code_quality => compile}/920608-1.c | 0 .../{special => compile}/981006-1.c | 0 .../gcc.c-torture/compile/981006-1.x | 12 ++ .../{special => execute}/920730-1.c | 0 .../gcc.c-torture/execute/920730-1t.c | 3 + .../gcc.c-torture/execute/920730-1t.x | 2 + .../{special => execute}/eeprof-1.c | 0 .../gcc.c-torture/execute/eeprof-1.x | 2 + .../gcc.c-torture/special/920413-1.c | 1 - .../gcc.c-torture/special/951130-1.c | 2 - .../gcc.c-torture/special/960224-2.c | 4 - .../gcc.c-torture/special/special.exp | 107 ------------------ gcc/testsuite/gcc.dg/920413-1.c | 10 ++ gcc/testsuite/gcc.dg/940409-1.c | 8 ++ gcc/testsuite/gcc.dg/951130-1.c | 5 + .../930510-1.c => gcc.dg/cpp/19930510-1.c} | 2 + .../960224-1.c => gcc.dg/cpp/19960224-1.c} | 2 + gcc/testsuite/gcc.dg/cpp/19960224-2.c | 6 + gcc/testsuite/gcc.failure/940409-1.c | 3 - gcc/testsuite/gcc.failure/940409-1.x | 6 - gcc/testsuite/gcc.failure/failure.exp | 58 ---------- .../920717-x.c => gcc.misc-tests/linkage-x.c} | 0 .../920717-y.c => gcc.misc-tests/linkage-y.c} | 0 gcc/testsuite/gcc.misc-tests/linkage.exp | 46 ++++++++ 30 files changed, 141 insertions(+), 236 deletions(-) delete mode 100644 gcc/testsuite/gcc.c-torture/code_quality/code_quality.exp rename gcc/testsuite/gcc.c-torture/{special => compile}/920520-1.c (100%) create mode 100644 gcc/testsuite/gcc.c-torture/compile/920520-1.x rename gcc/testsuite/gcc.c-torture/{special => compile}/920521-1.c (100%) create mode 100644 gcc/testsuite/gcc.c-torture/compile/920521-1.x rename gcc/testsuite/gcc.c-torture/{code_quality => compile}/920608-1.c (100%) rename gcc/testsuite/gcc.c-torture/{special => compile}/981006-1.c (100%) create mode 100644 gcc/testsuite/gcc.c-torture/compile/981006-1.x rename gcc/testsuite/gcc.c-torture/{special => execute}/920730-1.c (100%) create mode 100644 gcc/testsuite/gcc.c-torture/execute/920730-1t.c create mode 100644 gcc/testsuite/gcc.c-torture/execute/920730-1t.x rename gcc/testsuite/gcc.c-torture/{special => execute}/eeprof-1.c (100%) create mode 100644 gcc/testsuite/gcc.c-torture/execute/eeprof-1.x delete mode 100644 gcc/testsuite/gcc.c-torture/special/920413-1.c delete mode 100644 gcc/testsuite/gcc.c-torture/special/951130-1.c delete mode 100644 gcc/testsuite/gcc.c-torture/special/960224-2.c delete mode 100644 gcc/testsuite/gcc.c-torture/special/special.exp create mode 100644 gcc/testsuite/gcc.dg/920413-1.c create mode 100644 gcc/testsuite/gcc.dg/940409-1.c create mode 100644 gcc/testsuite/gcc.dg/951130-1.c rename gcc/testsuite/{gcc.c-torture/special/930510-1.c => gcc.dg/cpp/19930510-1.c} (80%) rename gcc/testsuite/{gcc.c-torture/special/960224-1.c => gcc.dg/cpp/19960224-1.c} (52%) create mode 100644 gcc/testsuite/gcc.dg/cpp/19960224-2.c delete mode 100644 gcc/testsuite/gcc.failure/940409-1.c delete mode 100644 gcc/testsuite/gcc.failure/940409-1.x delete mode 100644 gcc/testsuite/gcc.failure/failure.exp rename gcc/testsuite/{gcc.c-torture/special/920717-x.c => gcc.misc-tests/linkage-x.c} (100%) rename gcc/testsuite/{gcc.c-torture/special/920717-y.c => gcc.misc-tests/linkage-y.c} (100%) create mode 100644 gcc/testsuite/gcc.misc-tests/linkage.exp diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 6901218f2c0..39202234bcf 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,42 @@ +2000-06-28 Zack Weinberg + + 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 * c-torture/compile/961203-1.x: Delete. 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 b8b72ea1bcb..00000000000 --- 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 similarity index 100% rename from gcc/testsuite/gcc.c-torture/special/920520-1.c rename to 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 00000000000..4cfce33b2dc --- /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 similarity index 100% rename from gcc/testsuite/gcc.c-torture/special/920521-1.c rename to 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 00000000000..4cfce33b2dc --- /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 similarity index 100% rename from gcc/testsuite/gcc.c-torture/code_quality/920608-1.c rename to 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 similarity index 100% rename from gcc/testsuite/gcc.c-torture/special/981006-1.c rename to 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 00000000000..5c8d9f0ece5 --- /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 similarity index 100% rename from gcc/testsuite/gcc.c-torture/special/920730-1.c rename to 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 00000000000..bc5e4131983 --- /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 00000000000..cf05b31d54e --- /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 similarity index 100% rename from gcc/testsuite/gcc.c-torture/special/eeprof-1.c rename to 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 00000000000..0098d561c45 --- /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 a3e06139a5d..00000000000 --- 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 c06ba075ff6..00000000000 --- 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 3d696940640..00000000000 --- 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 cc5b812ee38..00000000000 --- 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 00000000000..db6bd08e89b --- /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 00000000000..e5049d9030e --- /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 00000000000..60013e267c4 --- /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 similarity index 80% rename from gcc/testsuite/gcc.c-torture/special/930510-1.c rename to gcc/testsuite/gcc.dg/cpp/19930510-1.c index 54ad858a5e2..724640a85f7 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 similarity index 52% rename from gcc/testsuite/gcc.c-torture/special/960224-1.c rename to gcc/testsuite/gcc.dg/cpp/19960224-1.c index de0a6ae7227..5efc6276934 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 00000000000..66d2abc9248 --- /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 3d5b58864e8..00000000000 --- 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 aac01277616..00000000000 --- 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 bfd9f3487ea..00000000000 --- 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 similarity index 100% rename from gcc/testsuite/gcc.c-torture/special/920717-x.c rename to 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 similarity index 100% rename from gcc/testsuite/gcc.c-torture/special/920717-y.c rename to 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 00000000000..83894845157 --- /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" + } + } + } +}