OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [tags/] [gnu-src/] [gcc-4.5.1/] [gcc-4.5.1-or32-1.0rc4/] [gcc/] [testsuite/] [lib/] [fortran-torture.exp] - Diff between revs 306 and 519

Only display areas with differences | Details | Blame | View Log

Rev 306 Rev 519
# Copyright (C) 2003, 2006, 2007, 2008, 2010 Free Software Foundation, Inc.
# Copyright (C) 2003, 2006, 2007, 2008, 2010 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# 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
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
# (at your option) any later version.
#
#
# This program is distributed in the hope that it will be useful,
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
# GNU General Public License for more details.
#
#
# You should have received a copy of the GNU General Public License
# You should have received a copy of the GNU General Public License
# along with GCC; see the file COPYING3.  If not see
# along with GCC; see the file COPYING3.  If not see
# .
# .
# Please email any bugs, comments, and/or additions to this file to
# Please email any bugs, comments, and/or additions to this file to
# the author.
# the author.
# This file was written by Steven Bosscher (s.bosscher@student.tudelft.nl)
# This file was written by Steven Bosscher (s.bosscher@student.tudelft.nl)
# based on f-torture.exp, which was written by Rob Savoye.
# based on f-torture.exp, which was written by Rob Savoye.
load_lib target-supports.exp
load_lib target-supports.exp
# Return the list of options to use for fortran torture tests.
# Return the list of options to use for fortran torture tests.
# The default option list can be overridden by
# The default option list can be overridden by
# TORTURE_OPTIONS="{ { list1 } ... { listN } }"
# TORTURE_OPTIONS="{ { list1 } ... { listN } }"
proc get-fortran-torture-options { } {
proc get-fortran-torture-options { } {
    global TORTURE_OPTIONS
    global TORTURE_OPTIONS
    if [info exists TORTURE_OPTIONS] {
    if [info exists TORTURE_OPTIONS] {
        return $TORTURE_OPTIONS
        return $TORTURE_OPTIONS
    }
    }
    # determine if host supports vectorization, and the necessary set
    # determine if host supports vectorization, and the necessary set
    # of options, based on code from testsuite/vect/vect.exp
    # of options, based on code from testsuite/vect/vect.exp
    set vectorizer_options [list "-O2" "-ftree-vectorize"]
    set vectorizer_options [list "-O2" "-ftree-vectorize"]
    if { [istarget "powerpc*-*-*"]
    if { [istarget "powerpc*-*-*"]
         && [is-effective-target powerpc_altivec_ok]
         && [is-effective-target powerpc_altivec_ok]
         && [check_vmx_hw_available] } {
         && [check_vmx_hw_available] } {
        lappend vectorizer_options "-maltivec"
        lappend vectorizer_options "-maltivec"
        set test_tree_vectorize 1
        set test_tree_vectorize 1
    } elseif { [istarget  "spu-*-*"] } {
    } elseif { [istarget  "spu-*-*"] } {
        set test_tree_vectorize 1
        set test_tree_vectorize 1
    } elseif { ( [istarget "i?86-*-*"] || [istarget "x86_64-*-*"] )
    } elseif { ( [istarget "i?86-*-*"] || [istarget "x86_64-*-*"] )
               && [check_effective_target_sse2]
               && [check_effective_target_sse2]
               && [check_sse2_hw_available]
               && [check_sse2_hw_available]
               && [check_sse_os_support_available] } {
               && [check_sse_os_support_available] } {
        lappend vectorizer_options "-msse2"
        lappend vectorizer_options "-msse2"
        set test_tree_vectorize 1
        set test_tree_vectorize 1
    } elseif { [istarget "mips*-*-*"]
    } elseif { [istarget "mips*-*-*"]
               && [check_effective_target_mpaired_single]
               && [check_effective_target_mpaired_single]
               && [check_effective_target_nomips16] } {
               && [check_effective_target_nomips16] } {
        lappend vectorizer_options "-mpaired-single"
        lappend vectorizer_options "-mpaired-single"
        set test_tree_vectorize 1
        set test_tree_vectorize 1
    } elseif { [istarget "sparc*-*-*"]
    } elseif { [istarget "sparc*-*-*"]
               && [check_effective_target_ultrasparc_hw] } {
               && [check_effective_target_ultrasparc_hw] } {
        lappend vectorizer_options "-mcpu=ultrasparc" "-mvis"
        lappend vectorizer_options "-mcpu=ultrasparc" "-mvis"
        set test_tree_vectorize 1
        set test_tree_vectorize 1
    } elseif { [istarget "alpha*-*-*"]
    } elseif { [istarget "alpha*-*-*"]
               && [check_alpha_max_hw_available] } {
               && [check_alpha_max_hw_available] } {
        lappend vectorizer_options "-mmax"
        lappend vectorizer_options "-mmax"
        set test_tree_vectorize 1
        set test_tree_vectorize 1
    } elseif [istarget "ia64-*-*"] {
    } elseif [istarget "ia64-*-*"] {
        set test_tree_vectorize 1
        set test_tree_vectorize 1
    } else {
    } else {
        set test_tree_vectorize 0
        set test_tree_vectorize 0
    }
    }
    set options {}
    set options {}
    lappend options \
    lappend options \
        { -O0 } \
        { -O0 } \
        { -O1 } \
        { -O1 } \
        { -O2 } \
        { -O2 } \
        { -O2 -fomit-frame-pointer -finline-functions } \
        { -O2 -fomit-frame-pointer -finline-functions } \
        { -O2 -fomit-frame-pointer -finline-functions -funroll-loops } \
        { -O2 -fomit-frame-pointer -finline-functions -funroll-loops } \
        { -O2 -fbounds-check } \
        { -O2 -fbounds-check } \
        { -O3 -g } \
        { -O3 -g } \
        { -Os }
        { -Os }
    if { $test_tree_vectorize } {
    if { $test_tree_vectorize } {
        lappend options $vectorizer_options
        lappend options $vectorizer_options
    }
    }
    if [info exists ADDITIONAL_TORTURE_OPTIONS] {
    if [info exists ADDITIONAL_TORTURE_OPTIONS] {
        set options [concat $options $ADDITIONAL_TORTURE_OPTIONS]
        set options [concat $options $ADDITIONAL_TORTURE_OPTIONS]
    }
    }
    return $options
    return $options
}
}
#
#
# fortran-torture-compile -- compile a gfortran.fortran-torture testcase.
# fortran-torture-compile -- compile a gfortran.fortran-torture testcase.
#
#
# SRC is the full pathname of the testcase.
# SRC is the full pathname of the testcase.
# OPTION is the specific compiler flag we're testing (eg: -O2).
# OPTION is the specific compiler flag we're testing (eg: -O2).
#
#
proc fortran-torture-compile { src option } {
proc fortran-torture-compile { src option } {
    global output
    global output
    global srcdir tmpdir
    global srcdir tmpdir
    global host_triplet
    global host_triplet
    set output "$tmpdir/[file tail [file rootname $src]].o"
    set output "$tmpdir/[file tail [file rootname $src]].o"
    regsub "(?q)$srcdir/" $src "" testcase
    regsub "(?q)$srcdir/" $src "" testcase
    # If we couldn't rip $srcdir out of `src' then just do the best we can.
    # If we couldn't rip $srcdir out of `src' then just do the best we can.
    # The point is to reduce the unnecessary noise in the logs.  Don't strip
    # The point is to reduce the unnecessary noise in the logs.  Don't strip
    # out too much because different testcases with the same name can confuse
    # out too much because different testcases with the same name can confuse
    # `test-tool'.
    # `test-tool'.
    if [string match "/*" $testcase] {
    if [string match "/*" $testcase] {
        set testcase "[file tail [file dirname $src]]/[file tail $src]"
        set testcase "[file tail [file dirname $src]]/[file tail $src]"
    }
    }
    verbose "Testing $testcase, $option" 1
    verbose "Testing $testcase, $option" 1
    # Run the compiler and get results in comp_output.
    # Run the compiler and get results in comp_output.
    set options ""
    set options ""
    lappend options "additional_flags=-w $option"
    lappend options "additional_flags=-w $option"
    set comp_output [gfortran_target_compile "$src" "$output" object $options]
    set comp_output [gfortran_target_compile "$src" "$output" object $options]
    # See if we got something bad.
    # See if we got something bad.
    set fatal_signal "*95*: Internal compiler error: program*got fatal signal"
    set fatal_signal "*95*: Internal compiler error: program*got fatal signal"
    if [string match "$fatal_signal 6" $comp_output] then {
    if [string match "$fatal_signal 6" $comp_output] then {
        gfortran_fail $testcase "Got Signal 6, $option"
        gfortran_fail $testcase "Got Signal 6, $option"
        catch { remote_file build delete $output }
        catch { remote_file build delete $output }
        return
        return
    }
    }
    if [string match "$fatal_signal 11" $comp_output] then {
    if [string match "$fatal_signal 11" $comp_output] then {
        gfortran_fail $testcase "Got Signal 11, $option"
        gfortran_fail $testcase "Got Signal 11, $option"
        catch { remote_file build delete $output }
        catch { remote_file build delete $output }
        return
        return
    }
    }
    if [string match "*internal compiler error*" $comp_output] then {
    if [string match "*internal compiler error*" $comp_output] then {
        gfortran_fail $testcase "$option (internal compiler error)"
        gfortran_fail $testcase "$option (internal compiler error)"
        catch { remote_file build delete $output }
        catch { remote_file build delete $output }
        return
        return
    }
    }
    # We shouldn't get these because of -w, but just in case.
    # We shouldn't get these because of -w, but just in case.
    if [string match "*95*:*warning:*" $comp_output] then {
    if [string match "*95*:*warning:*" $comp_output] then {
        warning "$testcase: (with warnings) $option"
        warning "$testcase: (with warnings) $option"
        send_log "$comp_output\n"
        send_log "$comp_output\n"
        unresolved "$testcase, $option"
        unresolved "$testcase, $option"
        catch { remote_file build delete $output }
        catch { remote_file build delete $output }
        return
        return
    }
    }
    # Prune warnings we know are unwanted.
    # Prune warnings we know are unwanted.
    set comp_output [prune_warnings $comp_output]
    set comp_output [prune_warnings $comp_output]
    # Report if the testcase is not supported.
    # Report if the testcase is not supported.
    set unsupported_message [gfortran_check_unsupported_p $comp_output]
    set unsupported_message [gfortran_check_unsupported_p $comp_output]
    if { $unsupported_message != "" } {
    if { $unsupported_message != "" } {
        unsupported "$testcase: $unsupported_message"
        unsupported "$testcase: $unsupported_message"
        catch { remote_file build delete $output }
        catch { remote_file build delete $output }
        return
        return
    }
    }
    # remove any leftover LF/CR to make sure any output is legit
    # remove any leftover LF/CR to make sure any output is legit
    regsub -all -- "\[\r\n\]*" $comp_output "" comp_output
    regsub -all -- "\[\r\n\]*" $comp_output "" comp_output
    # If any message remains, we fail.
    # If any message remains, we fail.
    if ![string match "" $comp_output] then {
    if ![string match "" $comp_output] then {
        gfortran_fail $testcase $option
        gfortran_fail $testcase $option
        catch { remote_file build delete $output }
        catch { remote_file build delete $output }
        return
        return
    }
    }
    gfortran_pass $testcase $option
    gfortran_pass $testcase $option
    catch { remote_file build delete $output }
    catch { remote_file build delete $output }
}
}
#
#
# fortran-torture-execute -- compile and execute a testcase.
# fortran-torture-execute -- compile and execute a testcase.
#
#
# SRC is the full pathname of the testcase.
# SRC is the full pathname of the testcase.
#
#
# If the testcase has an associated .x file, we source that to run the
# If the testcase has an associated .x file, we source that to run the
# test instead.  We use .x so that we don't lengthen the existing filename
# test instead.  We use .x so that we don't lengthen the existing filename
# to more than 14 chars.
# to more than 14 chars.
#
#
proc fortran-torture-execute { src } {
proc fortran-torture-execute { src } {
    global output
    global output
    global srcdir tmpdir
    global srcdir tmpdir
    global tool
    global tool
    global compiler_conditional_xfail_data
    global compiler_conditional_xfail_data
    global torture_with_loops
    global torture_with_loops
    # Check for alternate driver.
    # Check for alternate driver.
    set additional_flags ""
    set additional_flags ""
    if [file exists [file rootname $src].x] {
    if [file exists [file rootname $src].x] {
        verbose "Using alternate driver [file rootname [file tail $src]].x" 2
        verbose "Using alternate driver [file rootname [file tail $src]].x" 2
        set done_p 0
        set done_p 0
        catch "set done_p \[source [file rootname $src].x\]"
        catch "set done_p \[source [file rootname $src].x\]"
        if { $done_p } {
        if { $done_p } {
            return
            return
        }
        }
    }
    }
    # Setup the options for the testcase run.
    # Setup the options for the testcase run.
    set option_list $torture_with_loops
    set option_list $torture_with_loops
    set executable $tmpdir/[file tail [file rootname $src].x]
    set executable $tmpdir/[file tail [file rootname $src].x]
    regsub "(?q)$srcdir/" $src "" testcase
    regsub "(?q)$srcdir/" $src "" testcase
    # If we couldn't rip $srcdir out of `src' then just do the best we can.
    # If we couldn't rip $srcdir out of `src' then just do the best we can.
    # The point is to reduce the unnecessary noise in the logs.  Don't strip
    # The point is to reduce the unnecessary noise in the logs.  Don't strip
    # out too much because different testcases with the same name can confuse
    # out too much because different testcases with the same name can confuse
    # `test-tool'.
    # `test-tool'.
    if [string match "/*" $testcase] {
    if [string match "/*" $testcase] {
        set testcase "[file tail [file dirname $src]]/[file tail $src]"
        set testcase "[file tail [file dirname $src]]/[file tail $src]"
    }
    }
    # Walk the list of options and copmile and run the testcase for all
    # Walk the list of options and copmile and run the testcase for all
    # options that are not explicitly disabled by the .x script (if present).
    # options that are not explicitly disabled by the .x script (if present).
    foreach option $option_list {
    foreach option $option_list {
        # Torture_{compile,execute}_xfail are set by the .x script.
        # Torture_{compile,execute}_xfail are set by the .x script.
        if [info exists torture_compile_xfail] {
        if [info exists torture_compile_xfail] {
            setup_xfail $torture_compile_xfail
            setup_xfail $torture_compile_xfail
        }
        }
        # Torture_execute_before_{compile,execute} can be set by the .x script.
        # Torture_execute_before_{compile,execute} can be set by the .x script.
        if [info exists torture_eval_before_compile] {
        if [info exists torture_eval_before_compile] {
            set ignore_me [eval $torture_eval_before_compile]
            set ignore_me [eval $torture_eval_before_compile]
        }
        }
        # FIXME: We should make sure that the modules required by this testcase
        # FIXME: We should make sure that the modules required by this testcase
        # exist.  If not, the testcase should XFAIL.
        # exist.  If not, the testcase should XFAIL.
        # Compile the testcase.
        # Compile the testcase.
        catch { remote_file build delete $executable }
        catch { remote_file build delete $executable }
        verbose "Testing $testcase, $option" 1
        verbose "Testing $testcase, $option" 1
        set options ""
        set options ""
        lappend options "additional_flags=-w $option"
        lappend options "additional_flags=-w $option"
        if { $additional_flags != "" } {
        if { $additional_flags != "" } {
            lappend options "additional_flags=$additional_flags"
            lappend options "additional_flags=$additional_flags"
        }
        }
        set comp_output [gfortran_target_compile "$src" "$executable" executable $options]
        set comp_output [gfortran_target_compile "$src" "$executable" executable $options]
        # See if we got something bad.
        # See if we got something bad.
        set fatal_signal "*95*: Internal compiler error: program*got fatal signal"
        set fatal_signal "*95*: Internal compiler error: program*got fatal signal"
        if [string match "$fatal_signal 6" $comp_output] then {
        if [string match "$fatal_signal 6" $comp_output] then {
            gfortran_fail $testcase "Got Signal 6, $option"
            gfortran_fail $testcase "Got Signal 6, $option"
            catch { remote_file build delete $executable }
            catch { remote_file build delete $executable }
            continue
            continue
        }
        }
        if [string match "$fatal_signal 11" $comp_output] then {
        if [string match "$fatal_signal 11" $comp_output] then {
            gfortran_fail $testcase "Got Signal 11, $option"
            gfortran_fail $testcase "Got Signal 11, $option"
            catch { remote_file build delete $executable }
            catch { remote_file build delete $executable }
            continue
            continue
        }
        }
        if [string match "*internal compiler error*" $comp_output] then {
        if [string match "*internal compiler error*" $comp_output] then {
            gfortran_fail $testcase "$option (internal compiler error)"
            gfortran_fail $testcase "$option (internal compiler error)"
            catch { remote_file build delete $executable }
            catch { remote_file build delete $executable }
            continue
            continue
        }
        }
        # We shouldn't get these because of -w, but just in case.
        # We shouldn't get these because of -w, but just in case.
        if [string match "*95*:*warning:*" $comp_output] then {
        if [string match "*95*:*warning:*" $comp_output] then {
            warning "$testcase: (with warnings) $option"
            warning "$testcase: (with warnings) $option"
            send_log "$comp_output\n"
            send_log "$comp_output\n"
            unresolved "$testcase, $option"
            unresolved "$testcase, $option"
            catch { remote_file build delete $executable }
            catch { remote_file build delete $executable }
            continue
            continue
        }
        }
        # Prune warnings we know are unwanted.
        # Prune warnings we know are unwanted.
        set comp_output [prune_warnings $comp_output]
        set comp_output [prune_warnings $comp_output]
        # Report if the testcase is not supported.
        # Report if the testcase is not supported.
        set unsupported_message [gfortran_check_unsupported_p $comp_output]
        set unsupported_message [gfortran_check_unsupported_p $comp_output]
        if { $unsupported_message != "" } {
        if { $unsupported_message != "" } {
            unsupported "$testcase: $unsupported_message"
            unsupported "$testcase: $unsupported_message"
            continue
            continue
        } elseif ![file exists $executable] {
        } elseif ![file exists $executable] {
            if ![is3way] {
            if ![is3way] {
                fail "$testcase compilation, $option"
                fail "$testcase compilation, $option"
                untested "$testcase execution, $option"
                untested "$testcase execution, $option"
                continue
                continue
            } else {
            } else {
                # FIXME: since we can't test for the existence of a remote
                # FIXME: since we can't test for the existence of a remote
                # file without short of doing an remote file list, we assume
                # file without short of doing an remote file list, we assume
                # that since we got no output, it must have compiled.
                # that since we got no output, it must have compiled.
                pass "$testcase compilation, $option"
                pass "$testcase compilation, $option"
            }
            }
        } else {
        } else {
            pass "$testcase compilation, $option"
            pass "$testcase compilation, $option"
        }
        }
        # See if this source file uses INTEGER(KIND=8) types, if it does, and
        # See if this source file uses INTEGER(KIND=8) types, if it does, and
        # no_long_long is set, skip execution of the test.
        # no_long_long is set, skip execution of the test.
        # FIXME: We should also look for F95 style "_8" or select_int_kind()
        # FIXME: We should also look for F95 style "_8" or select_int_kind()
        # integers, but that is obviously much harder than just regexping this.
        # integers, but that is obviously much harder than just regexping this.
        # So maybe we should just avoid those in testcases.
        # So maybe we should just avoid those in testcases.
        if [target_info exists no_long_long] then {
        if [target_info exists no_long_long] then {
            if [expr [search_for_re $src "integer\*8"] \
            if [expr [search_for_re $src "integer\*8"] \
                     +[search_for_re $src "integer *( *8 *)"] \
                     +[search_for_re $src "integer *( *8 *)"] \
                     +[search_for_re $src "integer *( *kind *= *8 *)"]] \
                     +[search_for_re $src "integer *( *kind *= *8 *)"]] \
              then {
              then {
                untested "$testcase execution, $option"
                untested "$testcase execution, $option"
                continue
                continue
            }
            }
        }
        }
        if [info exists torture_execute_xfail] {
        if [info exists torture_execute_xfail] {
            setup_xfail $torture_execute_xfail
            setup_xfail $torture_execute_xfail
        }
        }
        if [info exists torture_eval_before_execute] {
        if [info exists torture_eval_before_execute] {
            set ignore_me [eval $torture_eval_before_execute]
            set ignore_me [eval $torture_eval_before_execute]
        }
        }
        # Run the testcase, and analyse the output.
        # Run the testcase, and analyse the output.
        set result [gfortran_load "$executable" "" ""]
        set result [gfortran_load "$executable" "" ""]
        set status [lindex $result 0]
        set status [lindex $result 0]
        set output [lindex $result 1]
        set output [lindex $result 1]
        if { $status == "pass" } {
        if { $status == "pass" } {
            catch { remote_file build delete $executable }
            catch { remote_file build delete $executable }
        }
        }
        $status "$testcase execution, $option"
        $status "$testcase execution, $option"
    }
    }
}
}
#
#
# search_for_re -- looks for a string match in a file
# search_for_re -- looks for a string match in a file
#
#
proc search_for_re { file pattern } {
proc search_for_re { file pattern } {
    set fd [open $file r]
    set fd [open $file r]
    while { [gets $fd cur_line]>=0 } {
    while { [gets $fd cur_line]>=0 } {
        set lower [string tolower $cur_line]
        set lower [string tolower $cur_line]
        if [regexp "$pattern" $lower] then {
        if [regexp "$pattern" $lower] then {
            close $fd
            close $fd
            return 1
            return 1
        }
        }
    }
    }
    close $fd
    close $fd
    return 0
    return 0
}
}
#
#
# fortran-torture -- the fortran-torture testcase source file processor
# fortran-torture -- the fortran-torture testcase source file processor
#
#
# This runs compilation only tests (no execute tests).
# This runs compilation only tests (no execute tests).
#
#
# SRC is the full pathname of the testcase, or just a file name in which
# SRC is the full pathname of the testcase, or just a file name in which
# case we prepend $srcdir/$subdir.
# case we prepend $srcdir/$subdir.
#
#
# If the testcase has an associated .x file, we source that to run the
# If the testcase has an associated .x file, we source that to run the
# test instead.  We use .x so that we don't lengthen the existing filename
# test instead.  We use .x so that we don't lengthen the existing filename
# to more than 14 chars.
# to more than 14 chars.
#
#
proc fortran-torture { args } {
proc fortran-torture { args } {
    global srcdir subdir
    global srcdir subdir
    global compiler_conditional_xfail_data
    global compiler_conditional_xfail_data
    global torture_with_loops
    global torture_with_loops
    set src [lindex $args 0]
    set src [lindex $args 0]
    if { [llength $args] > 1 } {
    if { [llength $args] > 1 } {
        set options [lindex $args 1]
        set options [lindex $args 1]
    } else {
    } else {
        set options ""
        set options ""
    }
    }
    # Prepend $srdir/$subdir if missing.
    # Prepend $srdir/$subdir if missing.
    if ![string match "*/*" $src] {
    if ![string match "*/*" $src] {
        set src "$srcdir/$subdir/$src"
        set src "$srcdir/$subdir/$src"
    }
    }
    # Check for alternate driver.
    # Check for alternate driver.
    if [file exists [file rootname $src].x] {
    if [file exists [file rootname $src].x] {
        verbose "Using alternate driver [file rootname [file tail $src]].x" 2
        verbose "Using alternate driver [file rootname [file tail $src]].x" 2
        set done_p 0
        set done_p 0
        catch "set done_p \[source [file rootname $src].x\]"
        catch "set done_p \[source [file rootname $src].x\]"
        if { $done_p } {
        if { $done_p } {
            return
            return
        }
        }
    }
    }
    # loop through all the options
    # loop through all the options
    set option_list $torture_with_loops
    set option_list $torture_with_loops
    foreach option $option_list {
    foreach option $option_list {
        # torture_compile_xfail is set by the .x script (if present)
        # torture_compile_xfail is set by the .x script (if present)
        if [info exists torture_compile_xfail] {
        if [info exists torture_compile_xfail] {
            setup_xfail $torture_compile_xfail
            setup_xfail $torture_compile_xfail
        }
        }
        # torture_execute_before_compile is set by the .x script (if present)
        # torture_execute_before_compile is set by the .x script (if present)
        if [info exists torture_eval_before_compile] {
        if [info exists torture_eval_before_compile] {
            set ignore_me [eval $torture_eval_before_compile]
            set ignore_me [eval $torture_eval_before_compile]
        }
        }
        fortran-torture-compile $src "$option $options"
        fortran-torture-compile $src "$option $options"
    }
    }
}
}
#
#
# add-ieee-options -- add options necessary for 100% ieee conformance.
# add-ieee-options -- add options necessary for 100% ieee conformance.
#
#
proc add-ieee-options { } {
proc add-ieee-options { } {
    # Ensure that excess precision does not cause problems.
    # Ensure that excess precision does not cause problems.
    if { [istarget "i?86-*-*"]
    if { [istarget "i?86-*-*"]
         || [istarget "m68k-*-*"] } then {
         || [istarget "m68k-*-*"] } then {
      uplevel 1 lappend additional_flags "-ffloat-store"
      uplevel 1 lappend additional_flags "-ffloat-store"
    }
    }
    # Enable full IEEE compliance mode.
    # Enable full IEEE compliance mode.
    if { [istarget "alpha*-*-*"]
    if { [istarget "alpha*-*-*"]
         || [istarget "sh*-*-*"] } then {
         || [istarget "sh*-*-*"] } then {
      uplevel 1 lappend additional_flags "-mieee"
      uplevel 1 lappend additional_flags "-mieee"
    }
    }
}
}
 
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.