[PATCH][testsuite] Fix TORTURE_OPTIONS overriding
authorJames Greenhalgh <james.greenhalgh@arm.com>
Wed, 24 Jun 2015 08:22:35 +0000 (08:22 +0000)
committerJames Greenhalgh <jgreenhalgh@gcc.gnu.org>
Wed, 24 Jun 2015 08:22:35 +0000 (08:22 +0000)
gcc/testsuite/

        * lib/c-torture.exp: Don't call check_effective_target_lto
before setting up environment correctly.
        * lib/gcc-dg.exp: Likewise, and protect
gcc_force_conventional_output.

From-SVN: r224878

gcc/testsuite/ChangeLog
gcc/testsuite/lib/c-torture.exp
gcc/testsuite/lib/gcc-dg.exp

index 8e28edc..ee58cdc 100644 (file)
@@ -1,3 +1,10 @@
+2015-06-24  James Greenhalgh  <james.greenhalgh@arm.com>
+
+        * lib/c-torture.exp: Don't call check_effective_target_lto
+       before setting up environment correctly.
+        * lib/gcc-dg.exp: Likewise, and protect
+       gcc_force_conventional_output.
+
 2015-06-24  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
 
        PR rtl-optimization/66306
index 607e7d0..c88c439 100644 (file)
@@ -21,6 +21,20 @@ load_lib file-format.exp
 load_lib target-libpath.exp
 load_lib target-utils.exp
 
+global GCC_UNDER_TEST
+if ![info exists GCC_UNDER_TEST] {
+    set GCC_UNDER_TEST "[find_gcc]"
+}
+
+global orig_environment_saved
+
+# This file may be sourced, so don't override environment settings
+# that have been previously setup.
+if { $orig_environment_saved == 0 } {
+    append ld_library_path [gcc-set-multilib-library-path $GCC_UNDER_TEST]
+    set_ld_library_path_env_vars
+}
+
 # The default option list can be overridden by
 # TORTURE_OPTIONS="{ list1 } ... { listN }"
 
@@ -68,20 +82,6 @@ if [info exists ADDITIONAL_TORTURE_OPTIONS] {
        [concat $C_TORTURE_OPTIONS $ADDITIONAL_TORTURE_OPTIONS]
 }
 
-global GCC_UNDER_TEST
-if ![info exists GCC_UNDER_TEST] {
-    set GCC_UNDER_TEST "[find_gcc]"
-}
-
-global orig_environment_saved
-
-# This file may be sourced, so don't override environment settings
-# that have been previously setup.
-if { $orig_environment_saved == 0 } {
-    append ld_library_path [gcc-set-multilib-library-path $GCC_UNDER_TEST]
-    set_ld_library_path_env_vars
-}
-
 #
 # c-torture-compile -- runs the Tege C-torture test
 #
index 00ca0c5..d463f81 100644 (file)
@@ -46,6 +46,19 @@ if ![info exists GCC_UNDER_TEST] {
     set GCC_UNDER_TEST "[find_gcc]"
 }
 
+# This file may be sourced, so don't override environment settings
+# that have been previously setup.
+if { $orig_environment_saved == 0 } {
+    append ld_library_path [gcc-set-multilib-library-path $GCC_UNDER_TEST]
+    set_ld_library_path_env_vars
+}
+
+# Some torture-options cause intermediate code output, unusable for
+# testing using e.g. scan-assembler.  In this variable are the options
+# how to force it, when needed.
+global gcc_force_conventional_output
+set gcc_force_conventional_output ""
+
 set LTO_TORTURE_OPTIONS ""
 if [info exists TORTURE_OPTIONS] {
     set DG_TORTURE_OPTIONS $TORTURE_OPTIONS
@@ -92,19 +105,6 @@ if [info exists ADDITIONAL_TORTURE_OPTIONS] {
 
 global orig_environment_saved
 
-# This file may be sourced, so don't override environment settings
-# that have been previously setup.
-if { $orig_environment_saved == 0 } {
-    append ld_library_path [gcc-set-multilib-library-path $GCC_UNDER_TEST]
-    set_ld_library_path_env_vars
-}
-
-# Some torture-options cause intermediate code output, unusable for
-# testing using e.g. scan-assembler.  In this variable are the options
-# how to force it, when needed.
-global gcc_force_conventional_output
-set gcc_force_conventional_output ""
-
 # Deduce generated files from tool flags, return finalcode string
 proc schedule-cleanups { opts } {
     global additional_sources