For 42319.cc the PR says that <ios> reproduced the problem, so let's
include that instead. We should also use the no_pch option because
otherwise the test is including everything anyway, and so fails to check
that the char_traits.h header can be included in isolation. There's also
no reason to use an explicit -std=gnu++11 option, we can test it for all
modes instead.

For the thread test there's no reason to use <bits/move.h> instead of
the correct header for std::move.

libstdc++-v3/ChangeLog:

        * testsuite/17_intro/headers/c++2011/42319.cc: Include <ios>
        instead of <bits/char_traits.h>. Add no_pch option. Remove
        explicit -std=gnu++11 option.
        * testsuite/30_threads/thread/swap/1.cc: Include <utility>
        instead of <bits/move.h>.
---

Tested x86_64-linux.

Pushed to trunk.

 libstdc++-v3/testsuite/17_intro/headers/c++2011/42319.cc | 4 ++--
 libstdc++-v3/testsuite/30_threads/thread/swap/1.cc       | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/libstdc++-v3/testsuite/17_intro/headers/c++2011/42319.cc 
b/libstdc++-v3/testsuite/17_intro/headers/c++2011/42319.cc
index cd576cad2979..350a5481dbd4 100644
--- a/libstdc++-v3/testsuite/17_intro/headers/c++2011/42319.cc
+++ b/libstdc++-v3/testsuite/17_intro/headers/c++2011/42319.cc
@@ -1,5 +1,5 @@
 // { dg-do compile }
-// { dg-options "-std=gnu++11" }
+// { dg-add-options no_pch }
 
 // Copyright (C) 2009-2025 Free Software Foundation, Inc.
 //
@@ -19,4 +19,4 @@
 // <http://www.gnu.org/licenses/>.
 
 // libstdc++/42319
-#include <bits/char_traits.h>
+#include <ios>
diff --git a/libstdc++-v3/testsuite/30_threads/thread/swap/1.cc 
b/libstdc++-v3/testsuite/30_threads/thread/swap/1.cc
index 9616b150d240..b1fde096e67d 100644
--- a/libstdc++-v3/testsuite/30_threads/thread/swap/1.cc
+++ b/libstdc++-v3/testsuite/30_threads/thread/swap/1.cc
@@ -23,7 +23,7 @@
 
 #include <thread>
 #include <system_error>
-#include <bits/move.h> // std::move
+#include <utility> // std::move
 #include <testsuite_hooks.h>
 
 void f() { }
-- 
2.51.0

Reply via email to