]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
coroutines, testsuite: Fix single test execution.
authorIain Sandoe <iain@sandoe.co.uk>
Tue, 17 Mar 2020 14:12:54 +0000 (14:12 +0000)
committerIain Sandoe <iain@sandoe.co.uk>
Tue, 17 Mar 2020 16:06:10 +0000 (16:06 +0000)
Invocations of the coro-torture.exp like 'coro-torture.exp=some-test.C' were
failing because DEFAULT_CXXFLAGS was undefined.  Fixed by defining this
locally, if it has no pre-existing global value.

gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/coroutines/torture/coro-torture.exp

index 15e7d6d669e0e8dbaef489de347d7e14e64e1105..ad4fcb5fe6219119e8db75f56b9e52993e88ee59 100644 (file)
@@ -1,3 +1,8 @@
+2020-03-17  Iain Sandoe  <iain@sandoe.co.uk>
+
+       * g++.dg/coroutines/torture/coro-torture.exp: Ensure that
+       DEFAULT_CXXFLAGS has a value, even if unset by a higher level.
+
 2020-03-17  Andre Vieira  <andre.simoesdiasvieira@arm.com>
             Mihail Ionescu  <mihail.ionescu@arm.com>
             Srinath Parvathaneni  <srinath.parvathaneni@arm.com>
index d2463b279831b1fe9f2feb07cd4afb69018a484e..2246f7154beddbebb1a956b28c5ac56388e2d977 100644 (file)
@@ -3,13 +3,19 @@
 load_lib g++-dg.exp
 load_lib torture-options.exp
 
-global DG_TORTURE_OPTIONS LTO_TORTURE_OPTIONS
+global DG_TORTURE_OPTIONS LTO_TORTURE_OPTIONS 
 
-dg-init
-torture-init
+# If a testcase doesn't have special options, use these.
+global DEFAULT_CXXFLAGS
+if ![info exists DEFAULT_CXXFLAGS] then {
+    set DEFAULT_CXXFLAGS " -pedantic-errors -Wno-long-long"
+}
 
 set DEFAULT_COROFLAGS $DEFAULT_CXXFLAGS
-lappend DEFAULT_COROFLAGS "-std=c++17" "-fcoroutines"
+lappend DEFAULT_COROFLAGS "-fcoroutines" "-std=c++17"
+
+dg-init
+torture-init
 
 set-torture-options [concat $DG_TORTURE_OPTIONS $LTO_TORTURE_OPTIONS]