public inbox for libstdc++@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH] Fix failing C++17 test
@ 2017-09-20 16:36 Jonathan Wakely
  0 siblings, 0 replies; only message in thread
From: Jonathan Wakely @ 2017-09-20 16:36 UTC (permalink / raw)
  To: libstdc++, gcc-patches

[-- Attachment #1: Type: text/plain, Size: 285 bytes --]

The DejaGnu directives were in the wrong order, so this test was
UNSUPPORTED and the error went unnoticed. Fixed like so.

	* testsuite/24_iterators/range_access_cpp17.cc: Fix order of dg-do
	and dg-options directives. Fix invalid test.

Tested powerpc64le-linux, committed to trunk.


[-- Attachment #2: patch.txt --]
[-- Type: text/plain, Size: 1124 bytes --]

commit 0365d53484cabf9eb1a49057c98f78b6b09fb513
Author: Jonathan Wakely <jwakely@redhat.com>
Date:   Wed Sep 20 16:37:00 2017 +0100

    Fix failing C++17 test
    
            * testsuite/24_iterators/range_access_cpp17.cc: Fix order of dg-do
            and dg-options directives. Fix invalid test.

diff --git a/libstdc++-v3/testsuite/24_iterators/range_access_cpp17.cc b/libstdc++-v3/testsuite/24_iterators/range_access_cpp17.cc
index 2402fa8c8ff..cb6b1c41619 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++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()));

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2017-09-20 16:36 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-09-20 16:36 [PATCH] Fix failing C++17 test Jonathan Wakely

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).