]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
libstdc++: Fix some freestanding test failures
authorArsen Arsenović <arsen@aarsen.me>
Tue, 4 Apr 2023 21:24:52 +0000 (23:24 +0200)
committerArsen Arsenović <arsen@aarsen.me>
Wed, 5 Apr 2023 16:45:15 +0000 (18:45 +0200)
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
libstdc++-v3/testsuite/18_support/96817.cc
libstdc++-v3/testsuite/18_support/bad_exception/59392.cc
libstdc++-v3/testsuite/20_util/scoped_allocator/108952.cc
libstdc++-v3/testsuite/20_util/uses_allocator/lwg3527.cc
libstdc++-v3/testsuite/29_atomics/atomic/operators/pointer_partial_void.cc

index bc011986b5315844b90675a1830772156603164c..176ad79ff3c330314dec6a5af1e7687f298df8c9 100644 (file)
@@ -75,7 +75,6 @@
 
 #if __cplusplus >= 201703L
 #include <any>
-#include <charconv>
 // #include <execution>
 #include <optional>
 #include <variant>
index 70938812bd8fe71707b24a79777ad7d5a0239429..073fc337e8f09a0dc1ae5dd69d6578e6cb7ed6e5 100644 (file)
@@ -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).
index ac64e6eddb22772af696cfd60f0f53e8aba4da77..ae972d0535db5dfe9d94de4b690f117fb5716132 100644 (file)
@@ -17,6 +17,7 @@
 
 // { dg-options "-Wno-deprecated" }
 // { dg-do run { target c++14_down } }
+// { dg-require-effective-target hosted }
 
 #include <exception>
 #include <cstdlib>
index a6b9c67498cd69ef5bf517104cf9313ead0ba83d..9342f453bf4952bdedf3d510beeb6d32d3c37a18 100644 (file)
@@ -1,4 +1,5 @@
 // { dg-do compile { target c++11 } }
+// { dg-require-effective-target hosted }
 
 #include <scoped_allocator>
 
index ae377f4b5a338390d09cdaf8c83f23e683f28b79..c5a7d513b314cc871a311c588b078c153fa1a864 100644 (file)
@@ -1,5 +1,6 @@
 // { dg-options "-std=gnu++20" }
 // { dg-do compile { target c++20 } }
+// { dg-require-effective-target hosted }
 
 #include <memory>
 
index ddb63233a644d2c7652cf925f08cf44b310ab8b7..e5d221ed15a2ce649c4ef95ff86fad679bab3dc8 100644 (file)
@@ -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.
 //