public inbox for libstdc++@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jonathan Wakely <jwakely@redhat.com>
To: libstdc++@gcc.gnu.org, gcc-patches@gcc.gnu.org
Subject: [committed] libstdc++: Fix test FAIL for old std::string ABI
Date: Tue,  4 Oct 2022 17:46:37 +0100	[thread overview]
Message-ID: <20221004164637.558771-1-jwakely@redhat.com> (raw)

Tested powerpc64le-linux. Pushed to trunk.

-- >8 --

libstdc++-v3/ChangeLog:

	* testsuite/std/ranges/adaptors/join_with/1.cc: Remove unused
	<sstream header.
	(test04): Remove constexpr for old std::string ABI and test at
	runtime.
---
 .../testsuite/std/ranges/adaptors/join_with/1.cc     | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)

diff --git a/libstdc++-v3/testsuite/std/ranges/adaptors/join_with/1.cc b/libstdc++-v3/testsuite/std/ranges/adaptors/join_with/1.cc
index efa350feb11..8b9c6c4fc9f 100644
--- a/libstdc++-v3/testsuite/std/ranges/adaptors/join_with/1.cc
+++ b/libstdc++-v3/testsuite/std/ranges/adaptors/join_with/1.cc
@@ -3,8 +3,7 @@
 
 #include <ranges>
 #include <algorithm>
-#include <sstream>
-#include <string_view>
+#include <string>
 #include <testsuite_hooks.h>
 #include <testsuite_iterators.h>
 
@@ -73,7 +72,10 @@ test03()
   return true;
 }
 
-constexpr bool
+#if _GLIBCXX_USE_CXX11_ABI
+constexpr
+#endif
+bool
 test04()
 {
   std::string rs[] = {"a", "", "b", "", "c"};
@@ -93,5 +95,9 @@ main()
   static_assert(test01());
   static_assert(test02());
   static_assert(test03());
+#if _GLIBCXX_USE_CXX11_ABI
   static_assert(test04());
+#else
+  VERIFY(test04());
+#endif
 }
-- 
2.37.3


                 reply	other threads:[~2022-10-04 16:46 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20221004164637.558771-1-jwakely@redhat.com \
    --to=jwakely@redhat.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=libstdc++@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).