From ddef210a8919486d2d9f9b65c914435a39b21060 Mon Sep 17 00:00:00 2001 From: Hans-Peter Nilsson Date: Mon, 13 Sep 2004 05:21:04 +0000 Subject: [PATCH] g77-dg.exp: Remove unused file. * lib/g77-dg.exp: Remove unused file. * lib/mike-g77.exp: Ditto. * lib/g77.exp: Ditto. From-SVN: r87425 --- gcc/testsuite/ChangeLog | 6 + gcc/testsuite/lib/g77-dg.exp | 46 ------ gcc/testsuite/lib/g77.exp | 225 ---------------------------- gcc/testsuite/lib/mike-g77.exp | 262 --------------------------------- 4 files changed, 6 insertions(+), 533 deletions(-) delete mode 100644 gcc/testsuite/lib/g77-dg.exp delete mode 100644 gcc/testsuite/lib/g77.exp delete mode 100644 gcc/testsuite/lib/mike-g77.exp diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 71f34e5c7c7..ae42e1bf8b3 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,9 @@ +2004-09-12 Hans-Peter Nilsson + + * lib/g77-dg.exp: Remove unused file. + * lib/mike-g77.exp: Ditto. + * lib/g77.exp: Ditto. + 2004-09-12 Richard Henderson * g++.old-deja/g++.other/sizeof3.C: Fix abort declaration. diff --git a/gcc/testsuite/lib/g77-dg.exp b/gcc/testsuite/lib/g77-dg.exp deleted file mode 100644 index 4734075fe52..00000000000 --- a/gcc/testsuite/lib/g77-dg.exp +++ /dev/null @@ -1,46 +0,0 @@ -# Copyright (C) 1997, 1999, 2000, 2003 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - -load_lib gcc-dg.exp - -# Define g77 callbacks for dg.exp. - -proc g77-dg-test { prog do_what extra_tool_flags } { - set result \ - [gcc-dg-test-1 g77_target_compile $prog $do_what $extra_tool_flags] - - set comp_output [lindex $result 0] - set output_file [lindex $result 1] - - # Put the error message on the same line as the line number - # Remove the line of source code with the error and - # the " ^" that points to error - regsub -all "\n\[^\n\]*\n *\\^\n" $comp_output "" comp_output - - return [list $comp_output $output_file] -} - -proc g77-dg-prune { system text } { - return [gcc-dg-prune $system $text] -} - -# Utility routines. - -# Modified dg-runtest that can cycle through a list of optimization options -# as c-torture does. -proc g77-dg-runtest { testcases default-extra-flags } { - return [gcc-dg-runtest $testcases ${default-extra-flags}] -} diff --git a/gcc/testsuite/lib/g77.exp b/gcc/testsuite/lib/g77.exp deleted file mode 100644 index ec0494d2fe5..00000000000 --- a/gcc/testsuite/lib/g77.exp +++ /dev/null @@ -1,225 +0,0 @@ -# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 2000, 2001, 2002 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, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - -# This file was written by Rob Savoye (rob@cygnus.com) -# Many modifications by Jeffrey Wheat (cassidy@cygnus.com) -# With modifications by Mike Stump . - -# -# g77 support library routines -# -load_lib prune.exp -load_lib gcc-defs.exp - -# -# G77_UNDER_TEST is the compiler under test. -# - - -set gpp_compile_options "" - - -# -# g77_version -- extract and print the version number of the compiler -# - -proc g77_version { } { - global G77_UNDER_TEST - - g77_init - - # ignore any arguments after the command - set compiler [lindex $G77_UNDER_TEST 0] - - # verify that the compiler exists - if { [is_remote host] || [which $compiler] != 0 } then { - set tmp [remote_exec host "$compiler -v"] - set status [lindex $tmp 0]; - set output [lindex $tmp 1]; - regexp " version \[^\n\r\]*" $output version - if { $status == 0 && [info exists version] } then { - if [is_remote host] { - clone_output "$compiler $version\n" - } else { - clone_output "[which $compiler] $version\n" - } - } else { - clone_output "Couldn't determine version of [which $compiler]\n" - } - } else { - # compiler does not exist (this should have already been detected) - warning "$compiler does not exist" - } -} - -# -# g77_link_flags -- provide new version of g77_link_flags -# (originally from libgloss.exp) which knows about the gcc tree structure -# - -proc g77_link_flags { paths } { - global rootme - global srcdir - global ld_library_path - global G77_UNDER_TEST - - set gccpath ${paths} - set libio_dir "" - set flags "" - set ld_library_path "." - - if { $gccpath != "" } { - if [file exists "${gccpath}/libf2c/.libs/libg2c.a"] { - append flags "-L${gccpath}/libf2c/.libs " - append ld_library_path ":${gccpath}/libf2c/.libs" - } - if [file exists "${gccpath}/libf2c/libfrtbegin.a"] { - append flags "-L${gccpath}/libf2c " - } - if [file exists "${gccpath}/libiberty/libiberty.a"] { - append flags "-L${gccpath}/libiberty " - } - append ld_library_path ":${rootme}" - set compiler [lindex $G77_UNDER_TEST 0] - if { [is_remote host] == 0 && [which $compiler] != 0 } { - foreach i "[exec $compiler --print-multi-lib]" { - set mldir "" - regexp -- "\[a-z0-9=/\.-\]*;" $i mldir - set mldir [string trimright $mldir "\;@"] - if { "$mldir" == "." } { - continue - } - if { [llength [glob -nocomplain ${rootme}/${mldir}/libgcc_s*.so.*]] == 1 } { - append ld_library_path ":${rootme}/${mldir}" - } - } - } - } - - # On IRIX 6, we have to set variables akin to LD_LIBRARY_PATH, but - # called LD_LIBRARYN32_PATH (for the N32 ABI) and LD_LIBRARY64_PATH - # (for the 64-bit ABI). The right way to do this would be to modify - # unix.exp -- but that's not an option since it's part of DejaGNU - # proper, so we do it here. - # The same applies to Darwin (DYLD_LIBRARY_PATH), Solaris 32 bit - # (LD_LIBRARY_PATH_32), Solaris 64 bit (LD_LIBRARY_PATH_64), and HP-UX - # (SHLIB_PATH). - setenv LD_LIBRARY_PATH $ld_library_path - setenv SHLIB_PATH $ld_library_path - setenv LD_LIBRARYN32_PATH $ld_library_path - setenv LD_LIBRARY64_PATH $ld_library_path - setenv LD_LIBRARY_PATH_32 $ld_library_path - setenv LD_LIBRARY_PATH_64 $ld_library_path - setenv DYLD_LIBRARY_PATH $ld_library_path - - return "$flags" -} - -# -# g77_init -- called at the start of each subdir of tests -# - -proc g77_init { args } { - global subdir - global gpp_initialized - global base_dir - global tmpdir - global libdir - global gluefile wrap_flags; - global objdir srcdir - global ALWAYS_G77FLAGS - global TOOL_EXECUTABLE TOOL_OPTIONS - global G77_UNDER_TEST - global TESTING_IN_BUILD_TREE - - if ![info exists G77_UNDER_TEST] then { - if [info exists TOOL_EXECUTABLE] { - set G77_UNDER_TEST $TOOL_EXECUTABLE; - } else { - if { [is_remote host] || ! [info exists TESTING_IN_BUILD_TREE] } { - set G77_UNDER_TEST [transform g77] - } else { - set G77_UNDER_TEST [findfile $base_dir/../g77 "$base_dir/../g77 -B$base_dir/../" [findfile $base_dir/g77 "$base_dir/g77 -B$base_dir/" [transform g77]]] - } - } - } - - if ![is_remote host] { - if { [which $G77_UNDER_TEST] == 0 } then { - perror "G77_UNDER_TEST ($G77_UNDER_TEST) does not exist" - exit 1 - } - } - if ![info exists tmpdir] { - set tmpdir "/tmp" - } - - if [info exists gluefile] { - unset gluefile - } - - if { [target_info needs_status_wrapper] != "" } { - set gluefile ${tmpdir}/g77-testglue.o; - set result [build_wrapper $gluefile]; - if { $result != "" } { - set gluefile [lindex $result 0]; - set wrap_flags [lindex $result 1]; - } else { - unset gluefile - } - } - - set ALWAYS_G77FLAGS "" - - if ![is_remote host] { - if [info exists TOOL_OPTIONS] { - lappend ALWAYS_G77FLAGS "ldflags=[g77_link_flags [get_multilibs ${TOOL_OPTIONS}] ]"; - } else { - lappend ALWAYS_G77FLAGS "ldflags=[g77_link_flags [get_multilibs] ]"; - } - } - - if [info exists TOOL_OPTIONS] { - lappend ALWAYS_G77FLAGS "additional_flags=$TOOL_OPTIONS"; - } - - verbose -log "ALWAYS_G77FLAGS set to $ALWAYS_G77FLAGS" - - verbose "g77 is initialized" 3 -} - -# -# g77_target_compile -- compile a source file -# - -proc g77_target_compile { source dest type options } { - global tmpdir; - global gluefile wrap_flags - global ALWAYS_G77FLAGS; - global G77_UNDER_TEST; - - if { [target_info needs_status_wrapper] != "" && [info exists gluefile] } { - lappend options "libs=${gluefile}" - lappend options "ldflags=${wrap_flags}" - } - - lappend options "compiler=$G77_UNDER_TEST"; - - set options [concat "$ALWAYS_G77FLAGS" $options]; - - return [target_compile $source $dest $type $options] -} diff --git a/gcc/testsuite/lib/mike-g77.exp b/gcc/testsuite/lib/mike-g77.exp deleted file mode 100644 index ccc9041e3ec..00000000000 --- a/gcc/testsuite/lib/mike-g77.exp +++ /dev/null @@ -1,262 +0,0 @@ -# Copyright (C) 1988, 90, 91, 92, 95, 96, 97, 1998 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, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - -# This file was derived from mike-g++.exp written by Mike Stump - -# Please email any bugs, comments, and/or additions to this file to: -# fortran@gnu.org - -# -# mike_cleanup -- remove any files that are created by the testcase -# -proc mike_cleanup { src_code output_file assembly_file } { - remote_file build delete $output_file $assembly_file; -} - -# -# prebase -- sets up a Mike Stump (mrs@cygnus.com) style g77 test -# -proc prebase { } { - global compiler_output - global not_compiler_output - global compiler_result - global not_compiler_result - global program_output - global groups - global run - global actions - global target_regexp - - set compiler_output "^$" - set not_compiler_output ".*Internal compiler error.*" - set compiler_result "" - set not_compiler_result "" - set program_output ".*PASS.*" - set groups {} - set run no - set actions assemble - set target_regexp ".*" -} - -# -# run the test -# -proc postbase { src_code run groups args } { - global verbose - global srcdir - global subdir - global not_compiler_output - global compiler_output - global compiler_result - global not_compiler_result - global program_output - global actions - global target_regexp - global host_triplet - global target_triplet - global tool - global tmpdir - global G77_UNDER_TEST - global GROUP - - if ![info exists G77_UNDER_TEST] { - error "No compiler specified for testing." - } - - if ![regexp $target_regexp $target_triplet] { - unsupported $subdir/$src_code - return - } - - if { [llength $args] > 0 } { - set comp_options [lindex $args 0]; - } else { - set comp_options "" - } - - set fail_message $subdir/$src_code - set pass_message $subdir/$src_code - - if [info exists GROUP] { - if {[lsearch $groups $GROUP] == -1} { - return - } - } - - if [string match $run yes] { - set actions run - } - - set output_file "$tmpdir/[file tail [file rootname $src_code]]" - set assembly_file "$output_file" - append assembly_file ".S" - - set compile_type "none" - - case $actions { - compile - { - set compile_type "assembly"; - set output_file $assembly_file; - } - assemble - { - set compile_type "object"; - append output_file ".o"; - } - link - { - set compile_type "executable"; - append output_file ".exe"; - } - run - { - set compile_type "executable"; - append output_file ".exe"; - set run yes; - } - default - { - set output_file ""; - set compile_type "none"; - } - } - - set src_file "$srcdir/$subdir/$src_code" - set options "" - lappend options "compiler=$G77_UNDER_TEST" - - if { $comp_options != "" } { - lappend options "additional_flags=$comp_options" - } - - set comp_output [g77_target_compile $src_file $output_file $compile_type $options]; - - set pass no - - # Delete things like "ld.so warning" messages. - set comp_output [prune_warnings $comp_output] - - if [regexp -- $not_compiler_output $comp_output] { - if { $verbose > 1 } { - send_user "\nChecking:\n$not_compiler_output\nto make sure it does not match:\n$comp_output\nbut it does.\n\n" - } else { - send_log "\nCompiler output:\n$comp_output\n\n" - } - fail $fail_message - # The framework doesn't like to see any error remnants, - # so remove them. - uplevel { - if [info exists errorInfo] { - unset errorInfo - } - } - mike_cleanup $src_code $output_file $assembly_file - return - } - - # remove any leftover CRs. - regsub -all -- "\r" $comp_output "" comp_output - - regsub -all "(^|\n)\[^\n\]*linker input file unused since linking not done" $comp_output "" comp_output - regsub -all "(^|\n)\[^\n\]*file path prefix \[^\n\]* never used" $comp_output "" comp_output - - set unsupported_message [${tool}_check_unsupported_p $comp_output] - if { $unsupported_message != "" } { - unsupported "$subdir/$src_code: $unsupported_message" - mike_cleanup $src_code $output_file $assembly_file - return - } - - if { $verbose > 1 } { - send_user "\nChecking:\n$compiler_output\nto see if it matches:\n$comp_output\n" - } else { - send_log "\nCompiler output:\n$comp_output\n\n" - } - if [regexp -- $compiler_output $comp_output] { - if { $verbose > 1 } { - send_user "Yes, it matches.\n\n" - } - set pass yes - if [file exists [file rootname [file tail $src_code]].s] { - set fd [open [file rootname [file tail $src_code]].s r] - set dot_s [read $fd] - close $fd - if { $compiler_result != "" } { - verbose "Checking .s file for $compiler_result" 2 - if [regexp -- $compiler_result $dot_s] { - verbose "Yes, it matches." 2 - } else { - verbose "Nope, doesn't match." 2 - verbose $dot_s 4 - set pass no - } - } - if { $not_compiler_result != "" } { - verbose "Checking .s file for not $not_compiler_result" 2 - if ![regexp -- $not_compiler_result $dot_s] { - verbose "Nope, not found (that's good)." 2 - } else { - verbose "Uh oh, it was found." 2 - verbose $dot_s 4 - set pass no - } - } - } - if [string match $run yes] { - set result [g77_load $output_file] - set status [lindex $result 0]; - set output [lindex $result 1]; - if { $status == -1 } { - mike_cleanup $src_code $output_file $assembly_file; - return; - } - if { $verbose > 1 } { - send_user "Checking:\n$program_output\nto see if it matches:\n$output\n\n" - } - if ![regexp -- $program_output $output] { - set pass no - if { $verbose > 1 } { - send_user "Nope, does not match.\n\n" - } - } else { - if { $verbose > 1 } { - send_user "Yes, it matches.\n\n" - } - } - } - } else { - if { $verbose > 1 } { - send_user "Nope, does not match.\n\n" - } - } - - if [string match $pass "yes"] { - pass $pass_message - } else { - fail $fail_message - } - - # The framework doesn't like to see any error remnants, - # so remove them. - uplevel { - if [info exists errorInfo] { - unset errorInfo - } - } - - mike_cleanup $src_code $output_file $assembly_file -} -- 2.30.2