+2004-07-16 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
+
+ * lib/fortran-torture.exp (fortran-torture): Don't test compile
+ tests with full list of options.
+ * lib/gfortran-dg.exp (gfortran-dg-runtest): Only test with all
+ of TORTURE_OPTIONS if test contains 'dg-do run'.
+
2004-07-16 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
PR rtl-optimization/16536
proc fortran-torture { args } {
global srcdir subdir
global compiler_conditional_xfail_data
- global TORTURE_OPTIONS
set src [lindex $args 0];
if { [llength $args] > 1 } {
}
# loop through all the options
- set option_list $TORTURE_OPTIONS
+ set option_list [list { "-O" } ]
foreach option $option_list {
# torture_compile_xfail is set by the .x script (if present)
# Modified dg-runtest that can cycle through a list of optimization options
# as c-torture does.
proc gfortran-dg-runtest { testcases default-extra-flags } {
- return [gcc-dg-runtest $testcases ${default-extra-flags}]
+ global runtests
+ global TORTURE_OPTIONS
+
+ foreach test $testcases {
+ # If we're only testing specific files and this isn't one of
+ # them, skip it.
+ if ![runtest_file_p $runtests $test] {
+ continue
+ }
+
+ # look if this is dg-do-run test, in which case
+ # we cycle through the option list, otherwise we don't
+ if [expr [search_for $test "dg-do run"]] {
+ set option_list $TORTURE_OPTIONS
+ } else {
+ set option_list [list { -O } ]
+ }
+
+ set nshort [file tail [file dirname $test]]/[file tail $test]
+
+ foreach flags $option_list {
+ verbose "Testing $nshort, $flags" 1
+ dg-test $test $flags ${default-extra-flags}
+ }
+ }
}