diff --git gcc/testsuite/g++.dg/asan/asan.exp gcc/testsuite/g++.dg/asan/asan.exp
index 30fbb1d..98ff59c 100644
--- gcc/testsuite/g++.dg/asan/asan.exp
+++ gcc/testsuite/g++.dg/asan/asan.exp
@@ -29,7 +29,7 @@ dg-init
 if [asan_init] {
 
 # Main loop.
-gcc-dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/*.C $srcdir/c-c++-common/asan/*.c]] ""
+gcc-dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/*.C $srcdir/c-c++-common/asan/*.c]] "" ""
 
 }
 
diff --git gcc/testsuite/g++.dg/charset/charset.exp gcc/testsuite/g++.dg/charset/charset.exp
index 3ca071e..c54e676 100644
--- gcc/testsuite/g++.dg/charset/charset.exp
+++ gcc/testsuite/g++.dg/charset/charset.exp
@@ -38,7 +38,7 @@ dg-init
 
 # Main loop.
 g++-dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/*.{c,cc,S} ]] \
-        $DEFAULT_CHARSETCFLAGS
+        "" $DEFAULT_CHARSETCFLAGS
 
 # All done.
 dg-finish
diff --git gcc/testsuite/g++.dg/cilk-plus/cilk-plus.exp gcc/testsuite/g++.dg/cilk-plus/cilk-plus.exp
index 0cb6539..b0f0362 100644
--- gcc/testsuite/g++.dg/cilk-plus/cilk-plus.exp
+++ gcc/testsuite/g++.dg/cilk-plus/cilk-plus.exp
@@ -26,12 +26,12 @@ if { ![check_effective_target_cilkplus] } {
 dg-init
 if [cilkplus_init] {
     # Run the tests that are shared with C.
-    g++-dg-runtest [lsort [glob -nocomplain $srcdir/c-c++-common/cilk-plus/PS/*.c]] ""
+    g++-dg-runtest [lsort [glob -nocomplain $srcdir/c-c++-common/cilk-plus/PS/*.c]] "" ""
     dg-runtest [lsort [glob -nocomplain $srcdir/c-c++-common/cilk-plus/SE/*.c]] "-O3" " "
     dg-runtest [lsort [glob -nocomplain $srcdir/c-c++-common/cilk-plus/SE/*.c]] " " " "
     dg-runtest [lsort [glob -nocomplain $srcdir/c-c++-common/cilk-plus/SE/*.c]] "-g -O2" " "
     # Run the C++ only tests.
-    g++-dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/*.C]] ""
+    g++-dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/*.C]] "" ""
 
     dg-runtest [lsort [glob -nocomplain $srcdir/c-c++-common/cilk-plus/AN/*.c]] " -fcilkplus" " "
     dg-runtest [lsort [glob -nocomplain $srcdir/c-c++-common/cilk-plus/AN/*.c]] " -O1 -fcilkplus" " "
diff --git gcc/testsuite/g++.dg/debug/dwarf2/dwarf2.exp gcc/testsuite/g++.dg/debug/dwarf2/dwarf2.exp
index d947a0e..b9eb97f 100644
--- gcc/testsuite/g++.dg/debug/dwarf2/dwarf2.exp
+++ gcc/testsuite/g++.dg/debug/dwarf2/dwarf2.exp
@@ -36,7 +36,7 @@ if { ! [string match "*: target system does not support the * debug format*" \
     $comp_output] } {
     remove-build-file "trivial.S"
     g++-dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/*.C $srcdir/c-c++-common/dwarf2/*.c]] \
-	    $DEFAULT_CFLAGS
+	    "" $DEFAULT_CFLAGS
 }
 
 # All done.
diff --git gcc/testsuite/g++.dg/dfp/dfp.exp gcc/testsuite/g++.dg/dfp/dfp.exp
index fceb126..3cfe03c 100644
--- gcc/testsuite/g++.dg/dfp/dfp.exp
+++ gcc/testsuite/g++.dg/dfp/dfp.exp
@@ -50,10 +50,10 @@ dg-init
 
 # Main loop.  Run the tests that are specific to C++.
 g++-dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/*.\[C]] \
-        $DEFAULT_CXXFLAGS
+        "" $DEFAULT_CXXFLAGS
 # Run tests that are shared with C testing.
 g++-dg-runtest [lsort [glob -nocomplain $srcdir/c-c++-common/dfp/*.c]] \
-        $DEFAULT_CXXFLAGS
+        "" $DEFAULT_CXXFLAGS
 
 # All done.
 dg-finish
diff --git gcc/testsuite/g++.dg/dg.exp gcc/testsuite/g++.dg/dg.exp
index aeae8f3..14beae1 100644
--- gcc/testsuite/g++.dg/dg.exp
+++ gcc/testsuite/g++.dg/dg.exp
@@ -57,14 +57,14 @@ set tests [prune $tests $srcdir/$subdir/ubsan/*]
 set tests [prune $tests $srcdir/$subdir/tsan/*]
 
 # Main loop.
-g++-dg-runtest $tests $DEFAULT_CXXFLAGS
+g++-dg-runtest $tests "" $DEFAULT_CXXFLAGS
 
 # C/C++ common tests.
 g++-dg-runtest [lsort [glob -nocomplain $srcdir/c-c++-common/*.\[cSi\]]] \
-	""
+	"" ""
 
 g++-dg-runtest [lsort [glob -nocomplain $srcdir/c-c++-common/cpp/*.\[cS\]]] \
-	""
+	"" ""
 
 
 # All done.
diff --git gcc/testsuite/g++.dg/gcov/gcov.exp gcc/testsuite/g++.dg/gcov/gcov.exp
index 892baa8..20cd9d0 100644
--- gcc/testsuite/g++.dg/gcov/gcov.exp
+++ gcc/testsuite/g++.dg/gcov/gcov.exp
@@ -39,6 +39,6 @@ if { $files != "" } {
 }
 
 # Main loop.
-g++-dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/*.C]] ""
+g++-dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/*.C]] "" ""
 
 dg-finish
diff --git gcc/testsuite/g++.dg/gomp/gomp.exp gcc/testsuite/g++.dg/gomp/gomp.exp
index bcb9ae3..def0ec1 100644
--- gcc/testsuite/g++.dg/gomp/gomp.exp
+++ gcc/testsuite/g++.dg/gomp/gomp.exp
@@ -29,7 +29,7 @@ dg-init
 # Main loop.
 g++-dg-runtest [lsort [concat \
 	[find $srcdir/$subdir *.C] \
-	[find $srcdir/c-c++-common/gomp *.c]]] "-fopenmp"
+	[find $srcdir/c-c++-common/gomp *.c]]] "" "-fopenmp"
 
 # All done.
 dg-finish
diff --git gcc/testsuite/g++.dg/graphite/graphite.exp gcc/testsuite/g++.dg/graphite/graphite.exp
index 7079634..c0ed3ce 100644
--- gcc/testsuite/g++.dg/graphite/graphite.exp
+++ gcc/testsuite/g++.dg/graphite/graphite.exp
@@ -46,14 +46,14 @@ set block_files       [lsort [glob -nocomplain $srcdir/$subdir/block-*.C ] ]
 
 # Tests to be compiled.
 set dg-do-what-default compile
-g++-dg-runtest $scop_files        "-O2 -fgraphite -fdump-tree-graphite-all"
-g++-dg-runtest $id_files          "-O2 -fgraphite-identity -ffast-math"
+g++-dg-runtest $scop_files        "" "-O2 -fgraphite -fdump-tree-graphite-all"
+g++-dg-runtest $id_files          "" "-O2 -fgraphite-identity -ffast-math"
 
 # Tests to be run.
 set dg-do-what-default run
-g++-dg-runtest $run_id_files      "-O2 -fgraphite-identity"
-g++-dg-runtest $interchange_files "-O2 -floop-interchange -fno-loop-block -fno-loop-strip-mine -ffast-math -fdump-tree-graphite-all"
-g++-dg-runtest $block_files       "-O2 -floop-block -fno-loop-strip-mine -fno-loop-interchange -ffast-math -fdump-tree-graphite-all"
+g++-dg-runtest $run_id_files      "" "-O2 -fgraphite-identity"
+g++-dg-runtest $interchange_files "" "-O2 -floop-interchange -fno-loop-block -fno-loop-strip-mine -ffast-math -fdump-tree-graphite-all"
+g++-dg-runtest $block_files       "" "-O2 -floop-block -fno-loop-strip-mine -fno-loop-interchange -ffast-math -fdump-tree-graphite-all"
 
 # The default action for the rest of the files is 'compile'.
 set dg-do-what-default compile
@@ -62,7 +62,7 @@ foreach f $id_files          {lremove wait_to_run_files $f}
 foreach f $run_id_files      {lremove wait_to_run_files $f}
 foreach f $interchange_files {lremove wait_to_run_files $f}
 foreach f $block_files       {lremove wait_to_run_files $f}
-g++-dg-runtest $wait_to_run_files " -pedantic-errors"
+g++-dg-runtest $wait_to_run_files "" "-pedantic-errors"
 
 # Clean up.
 set dg-do-what-default ${save-dg-do-what-default}
diff --git gcc/testsuite/g++.dg/guality/guality.exp gcc/testsuite/g++.dg/guality/guality.exp
index 3ff7f2f..e0a8e93 100644
--- gcc/testsuite/g++.dg/guality/guality.exp
+++ gcc/testsuite/g++.dg/guality/guality.exp
@@ -47,8 +47,8 @@ if {[check_guality "
     return 0;
   }
 "]} {
-  gcc-dg-runtest [lsort [glob $srcdir/$subdir/*.C]] ""
-  gcc-dg-runtest [lsort [glob $srcdir/c-c++-common/guality/*.c]] ""
+  gcc-dg-runtest [lsort [glob $srcdir/$subdir/*.C]] "" ""
+  gcc-dg-runtest [lsort [glob $srcdir/c-c++-common/guality/*.c]] "" ""
 }
 
 if [info exists guality_gdb_name] {
diff --git gcc/testsuite/g++.dg/simulate-thread/simulate-thread.exp gcc/testsuite/g++.dg/simulate-thread/simulate-thread.exp
index b07fbb0..9416637 100644
--- gcc/testsuite/g++.dg/simulate-thread/simulate-thread.exp
+++ gcc/testsuite/g++.dg/simulate-thread/simulate-thread.exp
@@ -31,8 +31,8 @@ set-torture-options [list \
 	{ -Os -g } ]
 
 if [gdb-exists] {
-  gcc-dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/*.C]] ""
-  gcc-dg-runtest [lsort [glob $srcdir/c-c++-common/simulate-thread/*.c]] ""
+  gcc-dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/*.C]] "" ""
+  gcc-dg-runtest [lsort [glob $srcdir/c-c++-common/simulate-thread/*.c]] "" ""
 }
 
 torture-finish
diff --git gcc/testsuite/g++.dg/tls/tls.exp gcc/testsuite/g++.dg/tls/tls.exp
index 279fdfd..cf7e5e8 100644
--- gcc/testsuite/g++.dg/tls/tls.exp
+++ gcc/testsuite/g++.dg/tls/tls.exp
@@ -29,7 +29,7 @@ if ![info exists DEFAULT_CXXFLAGS] then {
 dg-init
 
 # Main loop.
-g++-dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/*.C]] $DEFAULT_CXXFLAGS
+g++-dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/*.C]] "" $DEFAULT_CXXFLAGS
 
 # All done.
 dg-finish
diff --git gcc/testsuite/g++.dg/tm/tm.exp gcc/testsuite/g++.dg/tm/tm.exp
index 1d1dc3c..1d1c712 100644
--- gcc/testsuite/g++.dg/tm/tm.exp
+++ gcc/testsuite/g++.dg/tm/tm.exp
@@ -34,10 +34,10 @@ dg-init
 
 # Run the tests that are shared with C.
 g++-dg-runtest [lsort [glob -nocomplain $srcdir/c-c++-common/tm/*.c]] \
-	$DEFAULT_CXXFLAGS
+	"" $DEFAULT_CXXFLAGS
 # Run the C++ only tests.
 g++-dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/*.C]] \
-	$DEFAULT_CXXFLAGS
+	"" $DEFAULT_CXXFLAGS
 
 # All done.
 dg-finish
diff --git gcc/testsuite/g++.dg/torture/dg-torture.exp gcc/testsuite/g++.dg/torture/dg-torture.exp
index 7525e04..f42a6d2 100644
--- gcc/testsuite/g++.dg/torture/dg-torture.exp
+++ gcc/testsuite/g++.dg/torture/dg-torture.exp
@@ -3,5 +3,5 @@
 load_lib g++-dg.exp
 
 dg-init
-gcc-dg-runtest [lsort [glob $srcdir/$subdir/*.C $srcdir/c-c++-common/torture/*.c]] ""
+gcc-dg-runtest [lsort [glob $srcdir/$subdir/*.C $srcdir/c-c++-common/torture/*.c]] "" ""
 dg-finish
diff --git gcc/testsuite/g++.dg/torture/stackalign/stackalign.exp gcc/testsuite/g++.dg/torture/stackalign/stackalign.exp
index ad08fc0..a784d46 100644
--- gcc/testsuite/g++.dg/torture/stackalign/stackalign.exp
+++ gcc/testsuite/g++.dg/torture/stackalign/stackalign.exp
@@ -51,7 +51,7 @@ if { [check_effective_target_fpic] } then {
 # Combine stackalign options with the usual torture optimization flags.
 set-torture-options [concat $DG_TORTURE_OPTIONS $LTO_TORTURE_OPTIONS] $stackalign_options
 
-gcc-dg-runtest [lsort [glob $srcdir/$subdir/*.C]] "$default_flags"
+gcc-dg-runtest [lsort [glob $srcdir/$subdir/*.C]] "" "$default_flags"
 
 torture-finish
 dg-finish
diff --git gcc/testsuite/g++.dg/tsan/tsan.exp gcc/testsuite/g++.dg/tsan/tsan.exp
index 14ff02e..37caeb9 100644
--- gcc/testsuite/g++.dg/tsan/tsan.exp
+++ gcc/testsuite/g++.dg/tsan/tsan.exp
@@ -37,7 +37,7 @@ set-torture-options [list \
 if [tsan_init] {
 
 # Main loop.
-gcc-dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/*.C $srcdir/c-c++-common/tsan/*.c]] ""
+gcc-dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/*.C $srcdir/c-c++-common/tsan/*.c]] "" ""
 
 }
 
diff --git gcc/testsuite/g++.dg/ubsan/ubsan.exp gcc/testsuite/g++.dg/ubsan/ubsan.exp
index 7d5e9ba..769855e 100644
--- gcc/testsuite/g++.dg/ubsan/ubsan.exp
+++ gcc/testsuite/g++.dg/ubsan/ubsan.exp
@@ -25,7 +25,7 @@ dg-init
 if [ubsan_init] {
 
 # Main loop.
-gcc-dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/*.C $srcdir/c-c++-common/ubsan/*.c]] ""
+gcc-dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/*.C $srcdir/c-c++-common/ubsan/*.c]] "" ""
 
 }
 
diff --git gcc/testsuite/g++.dg/vect/vect.exp gcc/testsuite/g++.dg/vect/vect.exp
index 2bac810..26be0e46 100644
--- gcc/testsuite/g++.dg/vect/vect.exp
+++ gcc/testsuite/g++.dg/vect/vect.exp
@@ -59,9 +59,9 @@ dg-init
 
 # Main loop.
 g++-dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/pr*.{c,cc,S} ]] \
-        $DEFAULT_VECTCFLAGS
+        "" $DEFAULT_VECTCFLAGS
 g++-dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/slp-pr*.{c,cc,S} ]] \
-        $VECT_SLP_CFLAGS
+        "" $VECT_SLP_CFLAGS
 
 #### Tests with special options
 global SAVED_DEFAULT_VECTCFLAGS
@@ -71,7 +71,7 @@ set SAVED_DEFAULT_VECTCFLAGS $DEFAULT_VECTCFLAGS
 set DEFAULT_VECTCFLAGS $SAVED_DEFAULT_VECTCFLAGS
 lappend DEFAULT_VECTCFLAGS "--param max-aliased-vops=0"
 g++-dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/param-max-aliased*.\[cS\]]]  \
-        $DEFAULT_VECTCFLAGS
+        "" $DEFAULT_VECTCFLAGS
 
 # Clean up.
 set dg-do-what-default ${save-dg-do-what-default} 
diff --git gcc/testsuite/g++.old-deja/old-deja.exp gcc/testsuite/g++.old-deja/old-deja.exp
index ac3ed7c..153fdeb 100644
--- gcc/testsuite/g++.old-deja/old-deja.exp
+++ gcc/testsuite/g++.old-deja/old-deja.exp
@@ -31,7 +31,7 @@ dg-init
 set tests [lsort [find $srcdir/$subdir *.C]]
 
 # Main loop.
-g++-dg-runtest $tests $DEFAULT_CXXFLAGS
+g++-dg-runtest $tests "" $DEFAULT_CXXFLAGS
 
 # All done.
 dg-finish
diff --git gcc/testsuite/gcc.c-torture/compile/compile.exp gcc/testsuite/gcc.c-torture/compile/compile.exp
index 5fd4701..f688142 100644
--- gcc/testsuite/gcc.c-torture/compile/compile.exp
+++ gcc/testsuite/gcc.c-torture/compile/compile.exp
@@ -27,7 +27,7 @@ dg-init
 # Main loop.
 set saved-dg-do-what-default ${dg-do-what-default}
 set dg-do-what-default "assemble"
-gcc-dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/*.\[cS\]]] "-w"
+gcc-dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/*.\[cS\]]] "" "-w"
 set dg-do-what-default ${saved-dg-do-what-default}
 
 # All done.
diff --git gcc/testsuite/gcc.dg/asan/asan.exp gcc/testsuite/gcc.dg/asan/asan.exp
index 9be07fc..69534c4 100644
--- gcc/testsuite/gcc.dg/asan/asan.exp
+++ gcc/testsuite/gcc.dg/asan/asan.exp
@@ -31,7 +31,7 @@ dg-init
 if [asan_init] {
 
 # Main loop.
-gcc-dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/*.c $srcdir/c-c++-common/asan/*.c]] ""
+gcc-dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/*.c $srcdir/c-c++-common/asan/*.c]] "" ""
 
 }
 
diff --git gcc/testsuite/gcc.dg/atomic/atomic.exp gcc/testsuite/gcc.dg/atomic/atomic.exp
index 9200e31..94b7f08 100644
--- gcc/testsuite/gcc.dg/atomic/atomic.exp
+++ gcc/testsuite/gcc.dg/atomic/atomic.exp
@@ -26,7 +26,7 @@ load_lib atomic-dg.exp
 dg-init
 if [atomic_init] {
     # Main loop.
-    gcc-dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/*.c]] ""
+    gcc-dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/*.c]] "" ""
 }
 
 # All done.
diff --git gcc/testsuite/gcc.dg/format/format.exp gcc/testsuite/gcc.dg/format/format.exp
index 9d8a289..290033b 100644
--- gcc/testsuite/gcc.dg/format/format.exp
+++ gcc/testsuite/gcc.dg/format/format.exp
@@ -29,6 +29,6 @@ torture-init
 set-torture-options [list { } { -DWIDE } ]
 
 dg-init
-gcc-dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/*.\[cS\]]] ""
+gcc-dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/*.\[cS\]]] "" ""
 torture-finish
 dg-finish
diff --git gcc/testsuite/gcc.dg/guality/guality.exp gcc/testsuite/gcc.dg/guality/guality.exp
index 5e714dd..324f299 100644
--- gcc/testsuite/gcc.dg/guality/guality.exp
+++ gcc/testsuite/gcc.dg/guality/guality.exp
@@ -47,8 +47,8 @@ if {[check_guality "
     return 0;
   }
 "]} {
-  gcc-dg-runtest [lsort [glob $srcdir/$subdir/*.c]] ""
-  gcc-dg-runtest [lsort [glob $srcdir/c-c++-common/guality/*.c]] "-Wc++-compat"
+  gcc-dg-runtest [lsort [glob $srcdir/$subdir/*.c]] "" ""
+  gcc-dg-runtest [lsort [glob $srcdir/c-c++-common/guality/*.c]] "" "-Wc++-compat"
 }
 
 if [info exists guality_gdb_name] {
diff --git gcc/testsuite/gcc.dg/noncompile/noncompile.exp gcc/testsuite/gcc.dg/noncompile/noncompile.exp
index 15460ef..e46a950 100644
--- gcc/testsuite/gcc.dg/noncompile/noncompile.exp
+++ gcc/testsuite/gcc.dg/noncompile/noncompile.exp
@@ -21,5 +21,5 @@
 load_lib gcc-dg.exp
 
 dg-init
-gcc-dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/*.\[cS\]]] ""
+gcc-dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/*.\[cS\]]] "" ""
 dg-finish
diff --git gcc/testsuite/gcc.dg/simulate-thread/simulate-thread.exp gcc/testsuite/gcc.dg/simulate-thread/simulate-thread.exp
index a4c2302..7a34e70 100644
--- gcc/testsuite/gcc.dg/simulate-thread/simulate-thread.exp
+++ gcc/testsuite/gcc.dg/simulate-thread/simulate-thread.exp
@@ -33,8 +33,8 @@ set-torture-options [list \
 	{ -O3 -g } ]
 
 if [gdb-exists] {
-  gcc-dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/*.c]] ""
-  gcc-dg-runtest [lsort [glob $srcdir/c-c++-common/simulate-thread/*.c]] ""
+  gcc-dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/*.c]] "" ""
+  gcc-dg-runtest [lsort [glob $srcdir/c-c++-common/simulate-thread/*.c]] "" ""
 }
 
 torture-finish
diff --git gcc/testsuite/gcc.dg/torture/dg-torture.exp gcc/testsuite/gcc.dg/torture/dg-torture.exp
index cb91c79..94c48fc 100644
--- gcc/testsuite/gcc.dg/torture/dg-torture.exp
+++ gcc/testsuite/gcc.dg/torture/dg-torture.exp
@@ -3,5 +3,5 @@
 load_lib gcc-dg.exp
 
 dg-init
-gcc-dg-runtest [lsort [glob $srcdir/$subdir/*.c $srcdir/c-c++-common/torture/*.c]] ""
+gcc-dg-runtest [lsort [glob $srcdir/$subdir/*.c $srcdir/c-c++-common/torture/*.c]] "" ""
 dg-finish
diff --git gcc/testsuite/gcc.dg/torture/stackalign/stackalign.exp gcc/testsuite/gcc.dg/torture/stackalign/stackalign.exp
index 8ef84fe..64d9975 100644
--- gcc/testsuite/gcc.dg/torture/stackalign/stackalign.exp
+++ gcc/testsuite/gcc.dg/torture/stackalign/stackalign.exp
@@ -63,7 +63,7 @@ if { [check_effective_target_automatic_stack_alignment] } then {
 # Combine stackalign options with the usual torture optimization flags.
 set-torture-options [concat $DG_TORTURE_OPTIONS $LTO_TORTURE_OPTIONS] $stackalign_options
 
-gcc-dg-runtest [lsort [glob $srcdir/$subdir/*.c]] "$default_flags"
+gcc-dg-runtest [lsort [glob $srcdir/$subdir/*.c]] "" "$default_flags"
 
 torture-finish
 dg-finish
diff --git gcc/testsuite/gcc.dg/torture/tls/tls.exp gcc/testsuite/gcc.dg/torture/tls/tls.exp
index e8404232b..47cf6f3 100644
--- gcc/testsuite/gcc.dg/torture/tls/tls.exp
+++ gcc/testsuite/gcc.dg/torture/tls/tls.exp
@@ -50,7 +50,7 @@ set-torture-options $TLS_TORTURE_OPTIONS {{}} $LTO_TORTURE_OPTIONS
 
 # Main loop.
 gcc-dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/*.\[cS\]]] \
-        $DEFAULT_CFLAGS
+        "" $DEFAULT_CFLAGS
 
 # All done.
 torture-finish
diff --git gcc/testsuite/gcc.dg/tsan/tsan.exp gcc/testsuite/gcc.dg/tsan/tsan.exp
index f080195..8fa29bd 100644
--- gcc/testsuite/gcc.dg/tsan/tsan.exp
+++ gcc/testsuite/gcc.dg/tsan/tsan.exp
@@ -37,7 +37,7 @@ set-torture-options [list \
 if [tsan_init] {
 
 # Main loop.
-gcc-dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/*.c $srcdir/c-c++-common/tsan/*.c]] ""
+gcc-dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/*.c $srcdir/c-c++-common/tsan/*.c]] "" ""
 
 }
 
diff --git gcc/testsuite/gcc.dg/ubsan/ubsan.exp gcc/testsuite/gcc.dg/ubsan/ubsan.exp
index 962363b..5518d55 100644
--- gcc/testsuite/gcc.dg/ubsan/ubsan.exp
+++ gcc/testsuite/gcc.dg/ubsan/ubsan.exp
@@ -27,7 +27,7 @@ dg-init
 if [ubsan_init] {
 
 # Main loop.
-gcc-dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/*.c $srcdir/c-c++-common/ubsan/*.c]] ""
+gcc-dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/*.c $srcdir/c-c++-common/ubsan/*.c]] "" ""
 
 }
 
diff --git gcc/testsuite/gcc.dg/vmx/vmx.exp gcc/testsuite/gcc.dg/vmx/vmx.exp
index b3c73e8..63a8c3d 100644
--- gcc/testsuite/gcc.dg/vmx/vmx.exp
+++ gcc/testsuite/gcc.dg/vmx/vmx.exp
@@ -49,7 +49,7 @@ dg-init
 
 # Main loop.
 gcc-dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/*.c]] \
-	$DEFAULT_VMXCFLAGS
+	"" $DEFAULT_VMXCFLAGS
 
 # All done.
 dg-finish
diff --git gcc/testsuite/gcc.misc-tests/i386-prefetch.exp gcc/testsuite/gcc.misc-tests/i386-prefetch.exp
index 83e1045..159a964 100644
--- gcc/testsuite/gcc.misc-tests/i386-prefetch.exp
+++ gcc/testsuite/gcc.misc-tests/i386-prefetch.exp
@@ -98,16 +98,16 @@ if { [board_info target exists multilib_flags]
 }
 
 set-torture-options $PREFETCH_NONE
-gcc-dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/i386-pf-none-*.c]] ""
+gcc-dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/i386-pf-none-*.c]] "" ""
 
 set-torture-options $PREFETCH_SSE
-gcc-dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/i386-pf-sse-*.c]] ""
+gcc-dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/i386-pf-sse-*.c]] "" ""
 
 set-torture-options $PREFETCH_3DNOW
-gcc-dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/i386-pf-3dnow-*.c]] ""
+gcc-dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/i386-pf-3dnow-*.c]] "" ""
 
 set-torture-options $PREFETCH_ATHLON
-gcc-dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/i386-pf-athlon-*.c]] ""
+gcc-dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/i386-pf-athlon-*.c]] "" ""
 
 torture-finish
 dg-finish
diff --git gcc/testsuite/gcc.target/avr/torture/avr-torture.exp gcc/testsuite/gcc.target/avr/torture/avr-torture.exp
index 3e5fdfb..24563e1 100644
--- gcc/testsuite/gcc.target/avr/torture/avr-torture.exp
+++ gcc/testsuite/gcc.target/avr/torture/avr-torture.exp
@@ -55,7 +55,7 @@ set-torture-options $AVR_TORTURE_OPTIONS
 
 
 # Main loop.
-gcc-dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/*.{\[cS\],cpp}]] $DEFAULT_CFLAGS
+gcc-dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/*.{\[cS\],cpp}]] "" $DEFAULT_CFLAGS
 
 # Finalize use of torture lists.
 torture-finish
diff --git gcc/testsuite/gcc.target/cris/torture/cris-torture.exp gcc/testsuite/gcc.target/cris/torture/cris-torture.exp
index cf517fc..c7f3f6b 100644
--- gcc/testsuite/gcc.target/cris/torture/cris-torture.exp
+++ gcc/testsuite/gcc.target/cris/torture/cris-torture.exp
@@ -35,7 +35,7 @@ if ![info exists DEFAULT_CFLAGS] then {
 dg-init
 
 # Main loop.
-gcc-dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/*.\[cS\]]] $DEFAULT_CFLAGS
+gcc-dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/*.\[cS\]]] "" $DEFAULT_CFLAGS
 
 # All done.
 dg-finish
diff --git gcc/testsuite/gcc.target/frv/frv.exp gcc/testsuite/gcc.target/frv/frv.exp
index b3dcc25..61d8ad5 100644
--- gcc/testsuite/gcc.target/frv/frv.exp
+++ gcc/testsuite/gcc.target/frv/frv.exp
@@ -49,5 +49,5 @@ foreach arch $archs {
 }
 
 dg-init
-gcc-dg-runtest [eval concat $files] ""
+gcc-dg-runtest [eval concat $files] "" ""
 dg-finish
diff --git gcc/testsuite/gcc.target/i386/math-torture/math-torture.exp gcc/testsuite/gcc.target/i386/math-torture/math-torture.exp
index 112fb33..ea402b5 100644
--- gcc/testsuite/gcc.target/i386/math-torture/math-torture.exp
+++ gcc/testsuite/gcc.target/i386/math-torture/math-torture.exp
@@ -65,6 +65,6 @@ torture-init
 set-torture-options $MATH_TORTURE_OPTIONS {{}} $LTO_TORTURE_OPTIONS
 
 dg-init
-gcc-dg-runtest [lsort [glob $srcdir/$subdir/*.c]] ""
+gcc-dg-runtest [lsort [glob $srcdir/$subdir/*.c]] "" ""
 torture-finish
 dg-finish
diff --git gcc/testsuite/gcc.target/microblaze/microblaze.exp gcc/testsuite/gcc.target/microblaze/microblaze.exp
index f343181..d97ee9e 100644
--- gcc/testsuite/gcc.target/microblaze/microblaze.exp
+++ gcc/testsuite/gcc.target/microblaze/microblaze.exp
@@ -49,7 +49,7 @@ dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/isa/*.\[cSi\]]] \
 ${default_c_flags} ""
 
 gcc-dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/others/*.\[cSi\]]] \
-    "-mcpu=v6.00.a" 
+    "" "-mcpu=v6.00.a"
 
 
 # All done.
diff --git gcc/testsuite/gcc.target/mips/mips.exp gcc/testsuite/gcc.target/mips/mips.exp
index 6ad8160..e2b137e 100644
--- gcc/testsuite/gcc.target/mips/mips.exp
+++ gcc/testsuite/gcc.target/mips/mips.exp
@@ -1304,6 +1304,6 @@ proc mips-gcc-dg-test { prog do_what extra_tool_flags } {
 dg-init
 mips-dg-init
 gcc-dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/*.c]] \
-    "-DNOMIPS16=__attribute__((nomips16)) -DNOMICROMIPS=__attribute__((nomicromips)) -DNOCOMPRESSION=__attribute__((nocompression))"
+    "" "-DNOMIPS16=__attribute__((nomips16)) -DNOMICROMIPS=__attribute__((nomicromips)) -DNOCOMPRESSION=__attribute__((nocompression))"
 mips-dg-finish
 dg-finish
diff --git gcc/testsuite/gcc.target/powerpc/powerpc.exp gcc/testsuite/gcc.target/powerpc/powerpc.exp
index bf270d5..cad202d 100644
--- gcc/testsuite/gcc.target/powerpc/powerpc.exp
+++ gcc/testsuite/gcc.target/powerpc/powerpc.exp
@@ -45,7 +45,7 @@ if [check_vmx_hw_available] {
 }
 torture-init
 set-torture-options $SAVRES_TEST_OPTS
-gcc-dg-runtest [list $srcdir/$subdir/savres.c] $alti
+gcc-dg-runtest [list $srcdir/$subdir/savres.c] "" $alti
 
 # All done.
 torture-finish
diff --git gcc/testsuite/gcc.target/rx/rx.exp gcc/testsuite/gcc.target/rx/rx.exp
index 159add1..eacec40 100644
--- gcc/testsuite/gcc.target/rx/rx.exp
+++ gcc/testsuite/gcc.target/rx/rx.exp
@@ -37,7 +37,7 @@ dg-init
 set tests [lsort [find $srcdir/$subdir *.\[cS\]]]
 
 # Main loop.
-gcc-dg-runtest $tests $DEFAULT_CFLAGS
+gcc-dg-runtest $tests "" $DEFAULT_CFLAGS
 
 # All done.
 dg-finish
diff --git gcc/testsuite/gcc.target/sh/torture/sh-torture.exp gcc/testsuite/gcc.target/sh/torture/sh-torture.exp
index 8fef587..11fde87 100644
--- gcc/testsuite/gcc.target/sh/torture/sh-torture.exp
+++ gcc/testsuite/gcc.target/sh/torture/sh-torture.exp
@@ -35,7 +35,7 @@ if ![info exists DEFAULT_CFLAGS] then {
 dg-init
 
 # Main loop.
-gcc-dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/*.\[cS\]]] $DEFAULT_CFLAGS
+gcc-dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/*.\[cS\]]] "" $DEFAULT_CFLAGS
 
 # All done.
 dg-finish
diff --git gcc/testsuite/gcc.target/tic6x/builtins/c6x-builtins.exp gcc/testsuite/gcc.target/tic6x/builtins/c6x-builtins.exp
index e3e99ac..652ad0c 100644
--- gcc/testsuite/gcc.target/tic6x/builtins/c6x-builtins.exp
+++ gcc/testsuite/gcc.target/tic6x/builtins/c6x-builtins.exp
@@ -24,6 +24,6 @@ if { ![istarget tic6x-*-*] } then {
 }
 
 dg-init
-gcc-dg-runtest [lsort [glob $srcdir/$subdir/*.c]] ""
+gcc-dg-runtest [lsort [glob $srcdir/$subdir/*.c]] "" ""
 dg-finish
 
diff --git gcc/testsuite/gfortran.dg/dg.exp gcc/testsuite/gfortran.dg/dg.exp
index 3019951..eb985cb 100644
--- gcc/testsuite/gfortran.dg/dg.exp
+++ gcc/testsuite/gfortran.dg/dg.exp
@@ -30,10 +30,10 @@ dg-init
 
 # Main loop.
 gfortran-dg-runtest [lsort \
-       [glob -nocomplain $srcdir/$subdir/*.\[fF\]{,90,95,03,08} ] ] $DEFAULT_FFLAGS
+       [glob -nocomplain $srcdir/$subdir/*.\[fF\]{,90,95,03,08} ] ] "" $DEFAULT_FFLAGS
 
 gfortran-dg-runtest [lsort \
-       [glob -nocomplain $srcdir/$subdir/g77/*.\[fF\] ] ] $DEFAULT_FFLAGS
+       [glob -nocomplain $srcdir/$subdir/g77/*.\[fF\] ] ] "" $DEFAULT_FFLAGS
 
 
 # All done.
diff --git gcc/testsuite/gfortran.dg/goacc/goacc.exp gcc/testsuite/gfortran.dg/goacc/goacc.exp
index 96530d2..1093152 100644
--- gcc/testsuite/gfortran.dg/goacc/goacc.exp
+++ gcc/testsuite/gfortran.dg/goacc/goacc.exp
@@ -30,7 +30,7 @@ dg-init
 
 # Main loop.
 gfortran-dg-runtest [lsort \
-       [find $srcdir/$subdir *.\[fF\]{,90,95,03,08} ] ] " -fopenacc"
+       [find $srcdir/$subdir *.\[fF\]{,90,95,03,08} ] ] "" "-fopenacc"
 
 # All done.
 dg-finish
diff --git gcc/testsuite/gfortran.dg/gomp/gomp.exp gcc/testsuite/gfortran.dg/gomp/gomp.exp
index cb2e8a7..3f40d8e 100644
--- gcc/testsuite/gfortran.dg/gomp/gomp.exp
+++ gcc/testsuite/gfortran.dg/gomp/gomp.exp
@@ -30,7 +30,7 @@ dg-init
 
 # Main loop.
 gfortran-dg-runtest [lsort \
-       [find $srcdir/$subdir *.\[fF\]{,90,95,03,08} ] ] " -fopenmp"
+       [find $srcdir/$subdir *.\[fF\]{,90,95,03,08} ] ] "" "-fopenmp"
 
 # All done.
 dg-finish
diff --git gcc/testsuite/gfortran.dg/graphite/graphite.exp gcc/testsuite/gfortran.dg/graphite/graphite.exp
index c3aad13..0d35721 100644
--- gcc/testsuite/gfortran.dg/graphite/graphite.exp
+++ gcc/testsuite/gfortran.dg/graphite/graphite.exp
@@ -47,19 +47,19 @@ set vect_files        [lsort [glob -nocomplain $srcdir/$subdir/vect-*.\[fF\]{,90
 
 # Tests to be compiled.
 set dg-do-what-default compile
-gfortran-dg-runtest $scop_files        "-O2 -fgraphite -fdump-tree-graphite-all"
-gfortran-dg-runtest $id_files          "-O2 -fgraphite-identity -ffast-math"
-gfortran-dg-runtest $interchange_files "-O2 -floop-interchange -fno-loop-block -fno-loop-strip-mine -ffast-math -fdump-tree-graphite-all"
-gfortran-dg-runtest $block_files       "-O2 -floop-block -fno-loop-strip-mine -fno-loop-interchange -ffast-math -fdump-tree-graphite-all"
+gfortran-dg-runtest $scop_files        "" "-O2 -fgraphite -fdump-tree-graphite-all"
+gfortran-dg-runtest $id_files          "" "-O2 -fgraphite-identity -ffast-math"
+gfortran-dg-runtest $interchange_files "" "-O2 -floop-interchange -fno-loop-block -fno-loop-strip-mine -ffast-math -fdump-tree-graphite-all"
+gfortran-dg-runtest $block_files       "" "-O2 -floop-block -fno-loop-strip-mine -fno-loop-interchange -ffast-math -fdump-tree-graphite-all"
 
 # Vectorizer tests, to be run or compiled, depending on target capabilities.
 if [check_vect_support_and_set_flags] {
-    gfortran-dg-runtest $vect_files "-O2 -fgraphite-identity -ftree-vectorize -fno-vect-cost-model -fdump-tree-vect-details -ffast-math"
+    gfortran-dg-runtest $vect_files "" "-O2 -fgraphite-identity -ftree-vectorize -fno-vect-cost-model -fdump-tree-vect-details -ffast-math"
 }
 
 # Tests to be run.
 set dg-do-what-default run
-gfortran-dg-runtest $run_id_files      "-O2 -fgraphite-identity"
+gfortran-dg-runtest $run_id_files      "" "-O2 -fgraphite-identity"
 
 # The default action for the rest of the files is 'compile'.
 set dg-do-what-default compile
@@ -69,7 +69,7 @@ foreach f $interchange_files {lremove wait_to_run_files $f}
 foreach f $scop_files        {lremove wait_to_run_files $f}
 foreach f $run_id_files      {lremove wait_to_run_files $f}
 foreach f $vect_files        {lremove wait_to_run_files $f}
-gfortran-dg-runtest $wait_to_run_files ""
+gfortran-dg-runtest $wait_to_run_files "" ""
 
 # Clean up.
 set dg-do-what-default ${save-dg-do-what-default}
diff --git gcc/testsuite/gfortran.dg/guality/guality.exp gcc/testsuite/gfortran.dg/guality/guality.exp
index b3f64fb..3f96a04 100644
--- gcc/testsuite/gfortran.dg/guality/guality.exp
+++ gcc/testsuite/gfortran.dg/guality/guality.exp
@@ -25,7 +25,7 @@ if ![info exists ::env(GUALITY_GDB_NAME)] {
     setenv GUALITY_GDB_NAME "$guality_gdb_name"
 }
 
-gfortran-dg-runtest [lsort [glob $srcdir/$subdir/*.\[fF\]{,90,95,03,08} ]] ""
+gfortran-dg-runtest [lsort [glob $srcdir/$subdir/*.\[fF\]{,90,95,03,08} ]] "" ""
 
 if [info exists guality_gdb_name] {
     unsetenv GUALITY_GDB_NAME
diff --git gcc/testsuite/gfortran.dg/vect/vect.exp gcc/testsuite/gfortran.dg/vect/vect.exp
index 0827b3e..c6a704f 100644
--- gcc/testsuite/gfortran.dg/vect/vect.exp
+++ gcc/testsuite/gfortran.dg/vect/vect.exp
@@ -47,8 +47,8 @@ if ![check_vect_support_and_set_flags] {
 dg-init
 
 # Main loop.
-gfortran-dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/vect-*.\[fF\]{,90,95,03,08} ]] $DEFAULT_VECTCFLAGS
-gfortran-dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/pr*.\[fF\]{,90,95,03,08} ]] $DEFAULT_VECTCFLAGS
+gfortran-dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/vect-*.\[fF\]{,90,95,03,08} ]] "" $DEFAULT_VECTCFLAGS
+gfortran-dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/pr*.\[fF\]{,90,95,03,08} ]] "" $DEFAULT_VECTCFLAGS
 
 #### Tests with special options
 global SAVED_DEFAULT_VECTCFLAGS
diff --git gcc/testsuite/go.dg/dg.exp gcc/testsuite/go.dg/dg.exp
index e1f3ee3..5b68b51 100644
--- gcc/testsuite/go.dg/dg.exp
+++ gcc/testsuite/go.dg/dg.exp
@@ -30,7 +30,7 @@ dg-init
 
 # Main loop.
 go-dg-runtest [lsort \
-       [glob -nocomplain $srcdir/$subdir/*.go ] ] $DEFAULT_GOCFLAGS
+       [glob -nocomplain $srcdir/$subdir/*.go ] ] "" $DEFAULT_GOCFLAGS
 
 # All done.
 dg-finish
diff --git gcc/testsuite/go.test/go-test.exp gcc/testsuite/go.test/go-test.exp
index 4400d40..04fabdb 100644
--- gcc/testsuite/go.test/go-test.exp
+++ gcc/testsuite/go.test/go-test.exp
@@ -152,7 +152,7 @@ proc errchk { test opts } {
 
     set hold_runtests $runtests
     set runtests "go-test.exp"
-    go-dg-runtest $filename "-fno-show-column $DEFAULT_GOCFLAGS $opts"
+    go-dg-runtest $filename "" "-fno-show-column $DEFAULT_GOCFLAGS $opts"
     set runtests $hold_runtests
 
     file delete $filename
@@ -176,7 +176,7 @@ proc go-execute-xfail { test } {
 
     set hold_runtests $runtests
     set runtests "go-test.exp"
-    go-dg-runtest $filename "-w $DEFAULT_GOCFLAGS"
+    go-dg-runtest $filename "" "-w $DEFAULT_GOCFLAGS"
     set runtests $hold_runtests
 
     file delete $filename
@@ -524,7 +524,7 @@ proc go-gc-tests { } {
 	     || $test_line == "// echo bug395 is broken  # takes 90+ seconds to break" } {
 	    # This is a vanilla compile test.
 	    set dg-do-what-default "assemble"
-	    go-dg-runtest $test "-w $DEFAULT_GOCFLAGS"
+	    go-dg-runtest $test "" "-w $DEFAULT_GOCFLAGS"
 	} elseif { $test_line == "// run"
 		   || $test_line == "// \$G \$F.go && \$L \$F.\$A && ./\$A.out" } {
 	    # This is a vanilla execution test.
@@ -533,7 +533,7 @@ proc go-gc-tests { } {
 	} elseif { $test_line == "// build" } {
 	    # This is a vanilla compile and link test.
 	    set dg-do-what-default "link"
-	    go-dg-runtest $test "-w $DEFAULT_GOCFLAGS"
+	    go-dg-runtest $test "" "-w $DEFAULT_GOCFLAGS"
 	} elseif { [string match "// runoutput*" $test_line] \
 		       || ($test_line == "// \$G \$D/\$F.go && \$L \$F.\$A &&"
 			   && $test_line2 == "// ./\$A.out >tmp.go && \$G tmp.go && \$L -o \$A.out1 tmp.\$A && ./\$A.out1") } {
diff --git gcc/testsuite/lib/g++-dg.exp gcc/testsuite/lib/g++-dg.exp
index 24542c8..308f306 100644
--- gcc/testsuite/lib/g++-dg.exp
+++ gcc/testsuite/lib/g++-dg.exp
@@ -29,7 +29,7 @@ proc g++-dg-prune { system text } {
 
 # Modified dg-runtest that runs tests in both C++98 and C++11 modes
 # unless they specifically specify one or the other.
-proc g++-dg-runtest { testcases default-extra-flags } {
+proc g++-dg-runtest { testcases flags default-extra-flags } {
     global runtests
 
     foreach test $testcases {
@@ -53,9 +53,9 @@ proc g++-dg-runtest { testcases default-extra-flags } {
 
 	set nshort [file tail [file dirname $test]]/[file tail $test]
 
-	foreach flags $option_list {
-	    verbose "Testing $nshort, $flags" 1
-	    dg-test $test $flags ${default-extra-flags}
+	foreach flags_t $option_list {
+	    verbose "Testing $nshort, $flags $flags_t" 1
+	    dg-test $test "$flags $flags_t" ${default-extra-flags}
 	}
     }
 }
diff --git gcc/testsuite/lib/gcc-dg.exp gcc/testsuite/lib/gcc-dg.exp
index a758d47..3390caa 100644
--- gcc/testsuite/lib/gcc-dg.exp
+++ gcc/testsuite/lib/gcc-dg.exp
@@ -337,7 +337,7 @@ proc search_for { file pattern } {
 
 # Modified dg-runtest that can cycle through a list of optimization options
 # as c-torture does.
-proc gcc-dg-runtest { testcases default-extra-flags } {
+proc gcc-dg-runtest { testcases flags default-extra-flags } {
     global runtests
 
     # Some callers set torture options themselves; don't override those.
@@ -367,9 +367,9 @@ proc gcc-dg-runtest { testcases default-extra-flags } {
 
 	set nshort [file tail [file dirname $test]]/[file tail $test]
 
-	foreach flags $option_list {
-	    verbose "Testing $nshort, $flags" 1
-	    dg-test $test $flags ${default-extra-flags}
+	foreach flags_t $option_list {
+	    verbose "Testing $nshort, $flags $flags_t" 1
+	    dg-test $test "$flags $flags_t" ${default-extra-flags}
 	}
     }
 
diff --git gcc/testsuite/lib/gfortran-dg.exp gcc/testsuite/lib/gfortran-dg.exp
index f6a1dbe..7ccaf0d 100644
--- gcc/testsuite/lib/gfortran-dg.exp
+++ gcc/testsuite/lib/gfortran-dg.exp
@@ -88,7 +88,7 @@ proc gfortran-dg-prune { system text } {
 
 # Modified dg-runtest that can cycle through a list of optimization options
 # as c-torture does.
-proc gfortran-dg-runtest { testcases default-extra-flags } {
+proc gfortran-dg-runtest { testcases flags default-extra-flags } {
     global runtests
     global DG_TORTURE_OPTIONS torture_with_loops
 
@@ -113,9 +113,9 @@ proc gfortran-dg-runtest { testcases default-extra-flags } {
 	set nshort [file tail [file dirname $test]]/[file tail $test]
 	list-module-names $test
 
-	foreach flags $option_list {
-	    verbose "Testing $nshort, $flags" 1
-	    dg-test $test $flags ${default-extra-flags}
+	foreach flags_t $option_list {
+	    verbose "Testing $nshort, $flags $flags_t" 1
+	    dg-test $test "$flags $flags_t" ${default-extra-flags}
 	    cleanup-modules ""
 	}
     }
diff --git gcc/testsuite/lib/go-dg.exp gcc/testsuite/lib/go-dg.exp
index 71b6ab8..f222220 100644
--- gcc/testsuite/lib/go-dg.exp
+++ gcc/testsuite/lib/go-dg.exp
@@ -36,7 +36,7 @@ proc go-dg-prune { system text } {
 
 # Modified dg-runtest that can cycle through a list of optimization options
 # as c-torture does.
-proc go-dg-runtest { testcases default-extra-flags } {
+proc go-dg-runtest { testcases flags default-extra-flags } {
     global runtests
     global TORTURE_OPTIONS
 
@@ -57,9 +57,9 @@ proc go-dg-runtest { testcases default-extra-flags } {
 
 	set nshort [file tail [file dirname $test]]/[file tail $test]
 
-	foreach flags $option_list {
-	    verbose "Testing $nshort, $flags" 1
-	    dg-test $test $flags ${default-extra-flags}
+	foreach flags_t $option_list {
+	    verbose "Testing $nshort, $flags $flags_t" 1
+	    dg-test $test "$flags $flags_t" ${default-extra-flags}
 	}
     }
 }
diff --git gcc/testsuite/lib/obj-c++-dg.exp gcc/testsuite/lib/obj-c++-dg.exp
index 3b26342..95647fe 100644
--- gcc/testsuite/lib/obj-c++-dg.exp
+++ gcc/testsuite/lib/obj-c++-dg.exp
@@ -29,7 +29,7 @@ proc obj-c++-dg-prune { system text } {
 
 # Modified dg-runtest that can cycle through a list of optimization options
 # as c-torture does.
-proc obj-c++-dg-runtest { testcases default-extra-flags } {
+proc obj-c++-dg-runtest { testcases flags default-extra-flags } {
     global runtests
 
     # Some callers set torture options themselves; don't override those.
@@ -59,9 +59,9 @@ proc obj-c++-dg-runtest { testcases default-extra-flags } {
 
 	set nshort [file tail [file dirname $test]]/[file tail $test]
 
-	foreach flags $option_list {
+	foreach flags_t $option_list {
 	    # combine flags so that dg-skip & xfail will see the extras.
-	    set combined_flags "$flags ${default-extra-flags}"
+	    set combined_flags "$flags $flags_t ${default-extra-flags}"
 	    verbose "Testing $nshort, $combined_flags" 1
 	    dg-test $test $combined_flags ""
 	}
diff --git gcc/testsuite/lib/objc-dg.exp gcc/testsuite/lib/objc-dg.exp
index aeb9e9e..a5a59a8 100644
--- gcc/testsuite/lib/objc-dg.exp
+++ gcc/testsuite/lib/objc-dg.exp
@@ -30,7 +30,7 @@ proc objc-dg-prune { system text } {
 
 # Modified dg-runtest that can cycle through a list of optimization options
 # as c-torture does.
-proc objc-dg-runtest { testcases default-extra-flags } {
+proc objc-dg-runtest { testcases flags default-extra-flags } {
     global runtests
 
     # Some callers set torture options themselves; don't override those.
@@ -60,9 +60,9 @@ proc objc-dg-runtest { testcases default-extra-flags } {
 
 	set nshort [file tail [file dirname $test]]/[file tail $test]
 
-	foreach flags $option_list {
+	foreach flags_t $option_list {
 	    # combine flags so that dg-skip & xfail will see the extras.
-	    set combined_flags "$flags ${default-extra-flags}"
+	    set combined_flags "$flags $flags_t ${default-extra-flags}"
 	    verbose "Testing $nshort, $combined_flags" 1
 	    dg-test $test $combined_flags ""
 	}
diff --git gcc/testsuite/obj-c++.dg/torture/dg-torture.exp gcc/testsuite/obj-c++.dg/torture/dg-torture.exp
index 9ef34e9..c3d3f8e 100644
--- gcc/testsuite/obj-c++.dg/torture/dg-torture.exp
+++ gcc/testsuite/obj-c++.dg/torture/dg-torture.exp
@@ -7,11 +7,11 @@ dg-init
 # Gather a list of all tests.
 set tests [lsort [glob -nocomplain $srcdir/$subdir/*.mm]]
  
-obj-c++-dg-runtest $tests "-fgnu-runtime"
+obj-c++-dg-runtest $tests "" "-fgnu-runtime"
 
 # darwin targets can also run code with the NeXT runtime.
 if [istarget "*-*-darwin*" ] {
-  obj-c++-dg-runtest $tests "-fnext-runtime"
+  obj-c++-dg-runtest $tests "" "-fnext-runtime"
 }
 
 dg-finish
diff --git gcc/testsuite/obj-c++.dg/torture/strings/strings.exp gcc/testsuite/obj-c++.dg/torture/strings/strings.exp
index 87d47bb..377b889 100644
--- gcc/testsuite/obj-c++.dg/torture/strings/strings.exp
+++ gcc/testsuite/obj-c++.dg/torture/strings/strings.exp
@@ -24,11 +24,11 @@ dg-init
 # Gather a list of all tests.
 set tests [lsort [glob -nocomplain $srcdir/$subdir/*.mm]]
 
-obj-c++-dg-runtest $tests "-fgnu-runtime"
+obj-c++-dg-runtest $tests "" "-fgnu-runtime"
 
 # Darwin targets can also run code with the NeXT runtime.
 if [istarget "*-*-darwin*" ] {
-  obj-c++-dg-runtest $tests "-fnext-runtime"
+  obj-c++-dg-runtest $tests "" "-fnext-runtime"
 }
 
 dg-finish
diff --git gcc/testsuite/obj-c++.dg/torture/tls/tls.exp gcc/testsuite/obj-c++.dg/torture/tls/tls.exp
index 6d06680..2598ba8 100644
--- gcc/testsuite/obj-c++.dg/torture/tls/tls.exp
+++ gcc/testsuite/obj-c++.dg/torture/tls/tls.exp
@@ -6,11 +6,11 @@ dg-init
 # Gather a list of all tests.
 set tests [lsort [glob -nocomplain $srcdir/$subdir/*.mm]]
 
-obj-c++-dg-runtest $tests "-fgnu-runtime"
+obj-c++-dg-runtest $tests "" "-fgnu-runtime"
 
 # darwin targets can also run code with the NeXT runtime.
 if [istarget "*-*-darwin*" ] {
-  obj-c++-dg-runtest $tests "-fnext-runtime"
+  obj-c++-dg-runtest $tests "" "-fnext-runtime"
 }
 
 dg-finish
diff --git gcc/testsuite/objc.dg/torture/dg-torture.exp gcc/testsuite/objc.dg/torture/dg-torture.exp
index 4b1869e..28c2359 100644
--- gcc/testsuite/objc.dg/torture/dg-torture.exp
+++ gcc/testsuite/objc.dg/torture/dg-torture.exp
@@ -7,11 +7,11 @@ dg-init
 # Gather a list of all tests.
 set tests [lsort [glob -nocomplain $srcdir/$subdir/*.m]]
 
-objc-dg-runtest $tests "-fgnu-runtime"
+objc-dg-runtest $tests "" "-fgnu-runtime"
 
 # darwin targets can also run code with the NeXT runtime.
 if [istarget "*-*-darwin*" ] {
-  objc-dg-runtest $tests "-fnext-runtime"
+  objc-dg-runtest $tests "" "-fnext-runtime"
 }
 
 dg-finish
diff --git gcc/testsuite/objc.dg/torture/strings/strings.exp gcc/testsuite/objc.dg/torture/strings/strings.exp
index 85c48c5..57c0401 100644
--- gcc/testsuite/objc.dg/torture/strings/strings.exp
+++ gcc/testsuite/objc.dg/torture/strings/strings.exp
@@ -24,11 +24,11 @@ dg-init
 # Gather a list of all tests.
 set tests [lsort [glob -nocomplain $srcdir/$subdir/*.m]]
 
-objc-dg-runtest $tests "-fgnu-runtime"
+objc-dg-runtest $tests "" "-fgnu-runtime"
 
 # Darwin targets also test with the NeXT runtime.
 if [istarget "*-*-darwin*" ] {
-  objc-dg-runtest $tests "-fnext-runtime"
+  objc-dg-runtest $tests "" "-fnext-runtime"
 }
 
 dg-finish
diff --git gcc/testsuite/objc.dg/torture/tls/tls.exp gcc/testsuite/objc.dg/torture/tls/tls.exp
index 4b1869e..28c2359 100644
--- gcc/testsuite/objc.dg/torture/tls/tls.exp
+++ gcc/testsuite/objc.dg/torture/tls/tls.exp
@@ -7,11 +7,11 @@ dg-init
 # Gather a list of all tests.
 set tests [lsort [glob -nocomplain $srcdir/$subdir/*.m]]
 
-objc-dg-runtest $tests "-fgnu-runtime"
+objc-dg-runtest $tests "" "-fgnu-runtime"
 
 # darwin targets can also run code with the NeXT runtime.
 if [istarget "*-*-darwin*" ] {
-  objc-dg-runtest $tests "-fnext-runtime"
+  objc-dg-runtest $tests "" "-fnext-runtime"
 }
 
 dg-finish
diff --git libffi/testsuite/lib/libffi.exp libffi/testsuite/lib/libffi.exp
index 25efce2..ab0e0e0 100644
--- libffi/testsuite/lib/libffi.exp
+++ libffi/testsuite/lib/libffi.exp
@@ -238,7 +238,7 @@ proc search_for { file pattern } {
 
 # Modified dg-runtest that can cycle through a list of optimization options
 # as c-torture does.
-proc libffi-dg-runtest { testcases default-extra-flags } {
+proc libffi-dg-runtest { testcases flags default-extra-flags } {
     global runtests
 
     foreach test $testcases {
@@ -259,9 +259,9 @@ proc libffi-dg-runtest { testcases default-extra-flags } {
 
 	set nshort [file tail [file dirname $test]]/[file tail $test]
 
-	foreach flags $option_list {
-	    verbose "Testing $nshort, $flags" 1
-	    dg-test $test $flags ${default-extra-flags}
+	foreach flags_t $option_list {
+	    verbose "Testing $nshort, $flags $flags_t" 1
+	    dg-test $test "$flags $flags_t" ${default-extra-flags}
 	}
     }
 }
diff --git libgomp/testsuite/libgomp.fortran/fortran.exp libgomp/testsuite/libgomp.fortran/fortran.exp
index e0bffe3..cddf189 100644
--- libgomp/testsuite/libgomp.fortran/fortran.exp
+++ libgomp/testsuite/libgomp.fortran/fortran.exp
@@ -60,7 +60,7 @@ if { $lang_test_file_found } {
     set_ld_library_path_env_vars
 
     # Main loop.
-    gfortran-dg-runtest $tests ""
+    gfortran-dg-runtest $tests "" ""
 }
 
 # All done.
