Fix failing C++17 test
authorJonathan Wakely <jwakely@redhat.com>
Wed, 20 Sep 2017 16:34:53 +0000 (17:34 +0100)
committerJonathan Wakely <redi@gcc.gnu.org>
Wed, 20 Sep 2017 16:34:53 +0000 (17:34 +0100)
* testsuite/24_iterators/range_access_cpp17.cc: Fix order of dg-do
and dg-options directives. Fix invalid test.

From-SVN: r253019

libstdc++-v3/ChangeLog
libstdc++-v3/testsuite/24_iterators/range_access_cpp17.cc

index 9b789b967fad8236652bf188245ff1db37bf7c73..9019455cbf84be525e29dbdf0245b66faac8ab3e 100644 (file)
@@ -1,5 +1,8 @@
 2017-09-20  Jonathan Wakely  <jwakely@redhat.com>
 
+       * testsuite/24_iterators/range_access_cpp17.cc: Fix order of dg-do
+       and dg-options directives. Fix invalid test.
+
        PR libstdc++/81469
        * libsupc++/exception (uncaught_exception): Deprecate for C++17.
        * testsuite/18_support/exception_ptr/62258.cc: Add -Wno-deprecated.
index 2402fa8c8ff497cbc5666d83be023f778f1a7513..cb6b1c416190773e1ad76620e7f016c8de54588f 100644 (file)
@@ -1,5 +1,5 @@
-// { dg-do compile { target c++17 } }
 // { dg-options "-std=gnu++17" }
+// { dg-do compile { target c++17 } }
 
 // Copyright (C) 2017 Free Software Foundation, Inc.
 //
@@ -47,7 +47,7 @@ void
 test03()
 {
   using std::reverse_iterator;
-  static std::initializer_list<int> il{1};
+  static constexpr std::initializer_list<int> il{1};
   static_assert(std::cbegin(il) == il.begin());
   static_assert(std::cend(il) == il.end());
   static_assert(std::rbegin(il) == reverse_iterator<const int*>(il.end()));