libstdc++: Use c++NN_only effective target to tests

Some tests really are only intended for a specific -std mode, so add a
target selector to make that explicit.

Also reorder the dg-do directives to come after the dg-options ones, so
that the target selector in the dg-do directive is applied after the
dg-options that sets the -std option.

libstdc++-v3/ChangeLog:

	* testsuite/20_util/reference_wrapper/83427.cc: Adjust
	effective-target to specific language mode only.
	* testsuite/24_iterators/headers/iterator/range_access_c++11.cc:
	Likewise.
	* testsuite/24_iterators/headers/iterator/range_access_c++14.cc:
	Likewise.
	* testsuite/24_iterators/headers/iterator/synopsis_c++11.cc:
	Likewise.
	* testsuite/24_iterators/headers/iterator/synopsis_c++14.cc:
	Likewise.
	* testsuite/26_numerics/valarray/69116.cc:
	Likewise.
	* testsuite/30_threads/headers/condition_variable/std_c++0x_neg.cc:
	Remove whitespace at end of file.
	* testsuite/30_threads/headers/future/std_c++0x_neg.cc:
	Likewise.
This commit is contained in:
Jonathan Wakely 2020-07-31 19:58:02 +01:00
parent 6458742a15
commit 566f422734
8 changed files with 6 additions and 12 deletions

View file

@ -16,7 +16,7 @@
// <http://www.gnu.org/licenses/>.
// { dg-options "-std=gnu++17" }
// { dg-do compile { target c++17 } }
// { dg-do compile { target c++17_only } }
#include <functional>

View file

@ -1,5 +1,5 @@
// { dg-options "-std=gnu++11" }
// { dg-do compile }
// { dg-do compile { target c++11_only } }
// Copyright (C) 2010-2020 Free Software Foundation, Inc.
//

View file

@ -1,5 +1,5 @@
// { dg-options "-std=gnu++14" }
// { dg-do compile }
// { dg-do compile { target c++14_only } }
// Copyright (C) 2016-2020 Free Software Foundation, Inc.
//

View file

@ -1,5 +1,5 @@
// { dg-options "-std=gnu++11" }
// { dg-do compile }
// { dg-do compile { target c++11_only } }
// { dg-require-normal-namespace "" }
// Copyright (C) 2016-2020 Free Software Foundation, Inc.

View file

@ -1,5 +1,5 @@
// { dg-options "-std=gnu++14" }
// { dg-do compile }
// { dg-do compile { target c++14_only } }
// { dg-require-normal-namespace "" }
// Copyright (C) 2016-2020 Free Software Foundation, Inc.

View file

@ -15,8 +15,8 @@
// with this library; see the file COPYING3. If not see
// <http://www.gnu.org/licenses/>.
// { dg-do compile }
// { dg-options "-std=gnu++98" }
// { dg-do compile { target c++98_only } }
// libstdc++/69116

View file

@ -21,6 +21,3 @@
#include <condition_variable>
// { dg-error "ISO C.. 2011" "" { target *-*-* } 32 }

View file

@ -21,6 +21,3 @@
#include <future>
// { dg-error "ISO C.. 2011" "" { target *-*-* } 32 }