From 7ef7062dbcc9f322060038828e80c65e79f3243e Mon Sep 17 00:00:00 2001 From: Jonathan Wakely Date: Wed, 20 Sep 2017 17:51:03 +0100 Subject: [PATCH] Fix failing C++17 test * testsuite/24_iterators/range_access_cpp17.cc: Fix order of dg-do and dg-options directives. Fix invalid test. From-SVN: r253020 --- libstdc++-v3/ChangeLog | 3 +++ libstdc++-v3/testsuite/24_iterators/range_access_cpp17.cc | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index b75d191292c..942ed4df466 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,5 +1,8 @@ 2017-09-20 Jonathan Wakely + * testsuite/24_iterators/range_access_cpp17.cc: Fix order of dg-do + and dg-options directives. Fix invalid test. + Backport from mainline 2017-09-20 Jonathan Wakely diff --git a/libstdc++-v3/testsuite/24_iterators/range_access_cpp17.cc b/libstdc++-v3/testsuite/24_iterators/range_access_cpp17.cc index 1d5b0739007..9bdebcdaf61 100644 --- a/libstdc++-v3/testsuite/24_iterators/range_access_cpp17.cc +++ b/libstdc++-v3/testsuite/24_iterators/range_access_cpp17.cc @@ -1,5 +1,5 @@ -// { dg-do compile { target c++1z } } // { dg-options "-std=gnu++17" } +// { dg-do compile { target c++1z } } // Copyright (C) 2017 Free Software Foundation, Inc. // @@ -47,7 +47,7 @@ void test03() { using std::reverse_iterator; - static std::initializer_list il{1}; + static constexpr std::initializer_list il{1}; static_assert(std::cbegin(il) == il.begin()); static_assert(std::cend(il) == il.end()); static_assert(std::rbegin(il) == reverse_iterator(il.end()));