Imported Upstream version 4.8.1
[platform/upstream/gcc48.git] / gcc / testsuite / lib / lto.exp
index 4e5d443..8c2db33 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright (C) 2009, 2010 Free Software Foundation, Inc.
+# Copyright (C) 2009-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
@@ -499,7 +499,10 @@ proc lto-execute { src1 sid } {
        verbose "$testcase not supported on this target, skipping it" 3
        return
     }
-
+    # Should be safe for non-fortran too but be paranoid..
+    if {$sid eq "f_lto"} {
+       list-module-names $src_list
+    }
     regsub "_0.*" $testcase "" testcase
 
     # Set up the base name of executable files so they'll be unique.
@@ -578,6 +581,10 @@ proc lto-execute { src1 sid } {
             || ![string compare "link" $compile_type] } {
            file_on_host delete $execname
        }
+       # Should be safe for non-fortran too but be paranoid..
+       if {$sid eq "f_lto"} {
+           cleanup-modules ""
+       }
     }
 }