public inbox for libstdc++@gcc.gnu.org
 help / color / mirror / Atom feed
From: "Arsen Arsenović" <arsen@aarsen.me>
To: gcc-patches@gcc.gnu.org
Cc: libstdc++@gcc.gnu.org, "Arsen Arsenović" <arsen@aarsen.me>
Subject: [PATCH 4/4] libstdc++: Fix some freestanding test failures
Date: Wed,  5 Apr 2023 01:09:50 +0200	[thread overview]
Message-ID: <20230404230950.158556-4-arsen@aarsen.me> (raw)
In-Reply-To: <20230404230950.158556-1-arsen@aarsen.me>

At some point, <charconv> was added to the non-hosted bit of the C++17
block, which induced failures in many tests.

In addition, some tests also lacked a dg-require-effective-target hosted
tag.

libstdc++-v3/ChangeLog:

	* include/precompiled/stdc++.h (C++17): Don't double-include
	<charconv>, once with wrong conditions.
	* testsuite/18_support/96817.cc: Require hosted.
	* testsuite/18_support/bad_exception/59392.cc: Ditto.
	* testsuite/20_util/scoped_allocator/108952.cc: Ditto.
	* testsuite/20_util/uses_allocator/lwg3527.cc: Ditto.
	* testsuite/29_atomics/atomic/operators/pointer_partial_void.cc:
	Ditto.
---
 libstdc++-v3/include/precompiled/stdc++.h                        | 1 -
 libstdc++-v3/testsuite/18_support/96817.cc                       | 1 +
 libstdc++-v3/testsuite/18_support/bad_exception/59392.cc         | 1 +
 libstdc++-v3/testsuite/20_util/scoped_allocator/108952.cc        | 1 +
 libstdc++-v3/testsuite/20_util/uses_allocator/lwg3527.cc         | 1 +
 .../29_atomics/atomic/operators/pointer_partial_void.cc          | 1 +
 6 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/libstdc++-v3/include/precompiled/stdc++.h b/libstdc++-v3/include/precompiled/stdc++.h
index bc011986b53..176ad79ff3c 100644
--- a/libstdc++-v3/include/precompiled/stdc++.h
+++ b/libstdc++-v3/include/precompiled/stdc++.h
@@ -75,7 +75,6 @@
 
 #if __cplusplus >= 201703L
 #include <any>
-#include <charconv>
 // #include <execution>
 #include <optional>
 #include <variant>
diff --git a/libstdc++-v3/testsuite/18_support/96817.cc b/libstdc++-v3/testsuite/18_support/96817.cc
index 70938812bd8..073fc337e8f 100644
--- a/libstdc++-v3/testsuite/18_support/96817.cc
+++ b/libstdc++-v3/testsuite/18_support/96817.cc
@@ -17,6 +17,7 @@
 
 // { dg-do run }
 // { dg-additional-options "-pthread" { target pthread } }
+// { dg-require-effective-target hosted }
 
 // Static init cannot detect recursion for gthreads targets without futexes
 // (and the futex case can only detect it if __libc_single_threaded==true).
diff --git a/libstdc++-v3/testsuite/18_support/bad_exception/59392.cc b/libstdc++-v3/testsuite/18_support/bad_exception/59392.cc
index ac64e6eddb2..ae972d0535d 100644
--- a/libstdc++-v3/testsuite/18_support/bad_exception/59392.cc
+++ b/libstdc++-v3/testsuite/18_support/bad_exception/59392.cc
@@ -17,6 +17,7 @@
 
 // { dg-options "-Wno-deprecated" }
 // { dg-do run { target c++14_down } }
+// { dg-require-effective-target hosted }
 
 #include <exception>
 #include <cstdlib>
diff --git a/libstdc++-v3/testsuite/20_util/scoped_allocator/108952.cc b/libstdc++-v3/testsuite/20_util/scoped_allocator/108952.cc
index a6b9c67498c..9342f453bf4 100644
--- a/libstdc++-v3/testsuite/20_util/scoped_allocator/108952.cc
+++ b/libstdc++-v3/testsuite/20_util/scoped_allocator/108952.cc
@@ -1,4 +1,5 @@
 // { dg-do compile { target c++11 } }
+// { dg-require-effective-target hosted }
 
 #include <scoped_allocator>
 
diff --git a/libstdc++-v3/testsuite/20_util/uses_allocator/lwg3527.cc b/libstdc++-v3/testsuite/20_util/uses_allocator/lwg3527.cc
index ae377f4b5a3..c5a7d513b31 100644
--- a/libstdc++-v3/testsuite/20_util/uses_allocator/lwg3527.cc
+++ b/libstdc++-v3/testsuite/20_util/uses_allocator/lwg3527.cc
@@ -1,5 +1,6 @@
 // { dg-options "-std=gnu++20" }
 // { dg-do compile { target c++20 } }
+// { dg-require-effective-target hosted }
 
 #include <memory>
 
diff --git a/libstdc++-v3/testsuite/29_atomics/atomic/operators/pointer_partial_void.cc b/libstdc++-v3/testsuite/29_atomics/atomic/operators/pointer_partial_void.cc
index ddb63233a64..e5d221ed15a 100644
--- a/libstdc++-v3/testsuite/29_atomics/atomic/operators/pointer_partial_void.cc
+++ b/libstdc++-v3/testsuite/29_atomics/atomic/operators/pointer_partial_void.cc
@@ -1,5 +1,6 @@
 // { dg-do run { target { c++11_only || c++14_only } } }
 // { dg-require-atomic-builtins "" }
+// { dg-require-effective-target hosted }
 
 // Copyright (C) 2012-2023 Free Software Foundation, Inc.
 //
-- 
2.40.0


  parent reply	other threads:[~2023-04-04 23:10 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-04 23:09 [PATCH 1/4] libstdc++: Harmonize <version> and other headers Arsen Arsenović
2023-04-04 23:09 ` [PATCH 2/4] libstdc++: Add a test for <version> FTM redefinitions Arsen Arsenović
2023-04-05 10:59   ` Jonathan Wakely
2023-04-05 11:31     ` Arsen Arsenović
2023-04-05 11:38       ` Arsen Arsenović
2023-04-05 12:07         ` Jonathan Wakely
2023-04-04 23:09 ` [PATCH 3/4] libstdc++: Downgrade DEBUG to ASSERTIONS when !HOSTED Arsen Arsenović
2023-04-05 11:00   ` Jonathan Wakely
2023-04-04 23:09 ` Arsen Arsenović [this message]
2023-04-05 11:08   ` [PATCH 4/4] libstdc++: Fix some freestanding test failures Jonathan Wakely
2023-04-05 11:28     ` Arsen Arsenović
2023-04-05 10:52 ` [PATCH 1/4] libstdc++: Harmonize <version> and other headers Jonathan Wakely
2023-04-05 11:33   ` Arsen Arsenović
2023-04-05 12:09     ` Jonathan Wakely
2023-04-05 12:10       ` Jonathan Wakely

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=20230404230950.158556-4-arsen@aarsen.me \
    --to=arsen@aarsen.me \
    --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).