diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 16340e589a7..c0a802e8f9f 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,12 @@ +2009-11-11 H.J. Lu + + 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 * g++.dg/torture/pushpop_macro.C: New testcase. @@ -7,11 +16,11 @@ 2009-11-11 Jon Beniston - * 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 diff --git a/gcc/testsuite/gcc.dg/lto/lto.exp b/gcc/testsuite/gcc.dg/lto/lto.exp index 0e343c19b77..6cd798f46fb 100644 --- a/gcc/testsuite/gcc.dg/lto/lto.exp +++ b/gcc/testsuite/gcc.dg/lto/lto.exp @@ -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 diff --git a/gcc/testsuite/lib/lto.exp b/gcc/testsuite/lib/lto.exp index cccd64220bc..c3ff61aa2ce 100644 --- a/gcc/testsuite/lib/lto.exp +++ b/gcc/testsuite/lib/lto.exp @@ -17,11 +17,22 @@ # Contributed by Diego Novillo -# 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,