2014-01-13 Richard Biener * g++.dg/lto/lto.exp: Do check_effective_target_lto check before adjusting mathlib options. * gfortran.dg/lto/lto.exp: Likewise. Index: gcc/testsuite/g++.dg/lto/lto.exp =================================================================== *** gcc/testsuite/g++.dg/lto/lto.exp (revision 206575) --- gcc/testsuite/g++.dg/lto/lto.exp (working copy) *************** load_lib target-libpath.exp *** 35,40 **** --- 35,45 ---- # Load the language-independent compabibility support procedures. load_lib lto.exp + # If LTO has not been enabled, bail. + if { ![check_effective_target_lto] } { + return + } + g++_init lto_init no-mathlib *************** lto_init no-mathlib *** 42,52 **** # with other lto tests running at the same time. set sid "cp_lto" - # If LTO has not been enabled, bail. - if { ![check_effective_target_lto] } { - return - } - # Main loop. foreach src [lsort [find $srcdir/$subdir *_0.\[cC\]]] { # If we're only testing specific files and this isn't one of them, skip it. --- 47,52 ---- Index: gcc/testsuite/gfortran.dg/lto/lto.exp =================================================================== *** gcc/testsuite/gfortran.dg/lto/lto.exp (revision 206575) --- gcc/testsuite/gfortran.dg/lto/lto.exp (working copy) *************** load_lib gfortran-dg.exp *** 34,50 **** # Load the language-independent compabibility support procedures. load_lib lto.exp 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. set sid "f_lto" - # If LTO has not been enabled, bail. - if { ![check_effective_target_lto] } { - return - } - # Main loop. foreach src [lsort [glob -nocomplain $srcdir/$subdir/*_0.\[fF\]{,90,95,03,08} ]] { # If we're only testing specific files and this isn't one of them, skip it. --- 34,50 ---- # Load the language-independent compabibility support procedures. load_lib lto.exp + # If LTO has not been enabled, bail. + if { ![check_effective_target_lto] } { + return + } + 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. set sid "f_lto" # Main loop. foreach src [lsort [glob -nocomplain $srcdir/$subdir/*_0.\[fF\]{,90,95,03,08} ]] { # If we're only testing specific files and this isn't one of them, skip it.