Imported Upstream version 4.8.1
[platform/upstream/gcc48.git] / gcc / testsuite / lib / gfortran-dg.exp
index 0fd96b3..dca4de4 100644 (file)
@@ -1,4 +1,4 @@
-#   Copyright (C) 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
+#   Copyright (C) 2004-2013 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
@@ -111,10 +111,12 @@ proc gfortran-dg-runtest { testcases default-extra-flags } {
        }
 
        set nshort [file tail [file dirname $test]]/[file tail $test]
+       list-module-names $test
 
        foreach flags $option_list {
            verbose "Testing $nshort, $flags" 1
            dg-test $test $flags ${default-extra-flags}
+           cleanup-modules ""
        }
     }
 
@@ -171,6 +173,7 @@ proc gfortran-dg-debug-runtest { target_compile trivial opt_opts testcases } {
        }
 
        set nshort [file tail [file dirname $test]]/[file tail $test]
+       list-module-names $test
 
        foreach flags $DEBUG_TORTURE_OPTIONS {
            set doit 1
@@ -179,6 +182,7 @@ proc gfortran-dg-debug-runtest { target_compile trivial opt_opts testcases } {
            if { $doit } {
                verbose -log "Testing $nshort, $flags" 1
                dg-test $test $flags ""
+               cleanup-modules ""
            }
        }
     }