From c4da1da21e5eb6ce5a11407b3f229d9c3abece28 Mon Sep 17 00:00:00 2001 From: Jonathan Wakely Date: Sun, 31 Jul 2016 20:37:14 +0100 Subject: [PATCH] Change std::conditional test to compile-only * testsuite/20_util/conditional/requirements/typedefs.cc: Change to compile-only test. From-SVN: r238930 --- libstdc++-v3/ChangeLog | 3 +++ .../conditional/requirements/typedefs.cc | 24 ++++++------------- 2 files changed, 10 insertions(+), 17 deletions(-) diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index baf979a0c72..9bbfb4ca7c6 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,5 +1,8 @@ 2016-07-31 Jonathan Wakely + * testsuite/20_util/conditional/requirements/typedefs.cc: Change to + compile-only test. + * testsuite/29_atomics/atomic_flag/test_and_set/explicit-hle.cc: Ensure test is compiled with optimization. diff --git a/libstdc++-v3/testsuite/20_util/conditional/requirements/typedefs.cc b/libstdc++-v3/testsuite/20_util/conditional/requirements/typedefs.cc index 5729cecec4c..c00db4155a5 100644 --- a/libstdc++-v3/testsuite/20_util/conditional/requirements/typedefs.cc +++ b/libstdc++-v3/testsuite/20_util/conditional/requirements/typedefs.cc @@ -1,4 +1,4 @@ -// { dg-options "-std=gnu++11" } +// { dg-do compile { target c++11 } } // 2007-05-02 Benjamin Kosnik // @@ -20,22 +20,12 @@ // . #include -#include -void test01() -{ - bool test __attribute__((unused)) = true; - using std::conditional; +using std::conditional; +using std::is_same; - typedef conditional::type test1_type; - VERIFY( (std::is_same::value) ); +typedef conditional::type test1_type; +static_assert( is_same::value, "conditional" ); - typedef conditional::type test2_type; - VERIFY( (std::is_same::value) ); -} - -int main() -{ - test01(); - return 0; -} +typedef conditional::type test2_type; +static_assert( is_same::value, "conditional" );