OSDN Git Service

2009-11-11 H.J. Lu <hongjiu.lu@intel.com>
authorhjl <hjl@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 11 Nov 2009 20:34:13 +0000 (20:34 +0000)
committerhjl <hjl@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 11 Nov 2009 20:34:13 +0000 (20:34 +0000)
PR testsuite/42001
* gcc.dg/lto/lto.exp: Pass no-mathlib to lto_init.  Call
lto_finish at the end.

* lib/lto.exp (lto_init): Set mathlib to " " for no-mathlib.
(lto_finish): New. Restore mathlib.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@154104 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/lto/lto.exp
gcc/testsuite/lib/lto.exp

index 16340e5..c0a802e 100644 (file)
@@ -1,3 +1,12 @@
+2009-11-11  H.J. Lu  <hongjiu.lu@intel.com>
+
+       PR testsuite/42001
+       * gcc.dg/lto/lto.exp: Pass no-mathlib to lto_init.  Call
+       lto_finish at the end.
+
+       * lib/lto.exp (lto_init): Set mathlib to " " for no-mathlib.
+       (lto_finish): New. Restore mathlib.
+
 2009-11-11  Kai Tietz  <kai.tietz@onevision.com>
 
        * g++.dg/torture/pushpop_macro.C: New testcase.
 
 2009-11-11  Jon Beniston <jon@beniston.com>
 
-        * lib/target-supports.exp (check_profiling_available): lm32 target 
-          doesn't support profiling.
-        * gcc.dg/20020312-2.c: Add lm32 support.
-        * g++.dg/other/packed1.C: Expect to fail on lm32.        
-        * g++.old-deja/g++.jason/thunk3.C: Likewise.                 
+       * lib/target-supports.exp (check_profiling_available): lm32 target 
+         doesn't support profiling.
+       * gcc.dg/20020312-2.c: Add lm32 support.
+       * g++.dg/other/packed1.C: Expect to fail on lm32.        
+       * g++.old-deja/g++.jason/thunk3.C: Likewise.                 
 
 2009-11-11  Daniel Jacobowitz  <dan@codesourcery.com>
 
index 0e343c1..6cd798f 100644 (file)
@@ -35,7 +35,7 @@ load_lib gcc.exp
 load_lib lto.exp
 
 gcc_init
-lto_init
+lto_init no-mathlib
 
 # Define an identifier for use with this suite to avoid name conflicts
 # with other lto tests running at the same time.
@@ -55,3 +55,5 @@ foreach src [lsort [find $srcdir/$subdir *_0.c]] {
 
     lto-execute $src $sid
 }
+
+lto_finish
index cccd642..c3ff61a 100644 (file)
 # Contributed by Diego Novillo <dnovillo@google.com>
 
 
-# lto_init -- called at the start of eac subdir of tests
+# lto_init -- called at the start of each subdir of tests
 
 proc lto_init { args } {
     global LTO_OPTIONS
 
+    if {[info exists args] && $args == "no-mathlib"} {
+       global board_info
+       global saved_mathlib
+
+       set dest [target_info name]
+       if [board_info $dest exists mathlib] {
+           set saved_mathlib [board_info $dest mathlib]
+       }
+       set board_info($dest,mathlib) " "
+    }
+
     # Each test is run with the compiler options from this list.
     # The default option lists can be overridden by LTO_OPTIONS="[list
     # {opts_1} {opts_2}... {opts_n}]" where opts_i are lists of options.
@@ -37,6 +48,22 @@ proc lto_init { args } {
     }
 }
 
+#
+# lto_finish -- called at the end of each subdir of tests if mathlib is
+#              changed.
+#
+
+proc lto_finish { } {
+    global board_info
+    global saved_mathlib
+
+    set dest [target_info name]
+    if [info exists saved_mathlib] {
+       set board_info($dest,mathlib) $saved_mathlib
+    } elseif [board_info $dest exists mathlib] {
+       unset board_info($dest,mathlib)
+    }
+}
 
 # Subsets of tests can be selectively disabled by members of this list:
 #  - ATTRIBUTE: disable all tests using the __attribute__ extension,