[gcc r15-6828] testsuite: libstdc++: Use effective-target libatomic

2025-01-11 Thread Torbjorn Svensson via Libstdc++-cvs
https://gcc.gnu.org/g:4b0ef49d02f1f16325aa53fee3b0f6860728d2f8

commit r15-6828-g4b0ef49d02f1f16325aa53fee3b0f6860728d2f8
Author: Torbjörn SVENSSON 
Date:   Mon Dec 23 18:46:10 2024 +0100

testsuite: libstdc++: Use effective-target libatomic

Test assumes libatomic.a is always available, but for some embedded
targets, there is no libatomic.a and the test thus fail.

libstdc++-v3/ChangeLog:

* testsuite/29_atomics/atomic_float/compare_exchange_padding.cc:
Use effective-target libatomic_available.

Signed-off-by: Torbjörn SVENSSON 

Diff:
---
 .../testsuite/29_atomics/atomic_float/compare_exchange_padding.cc| 1 +
 1 file changed, 1 insertion(+)

diff --git 
a/libstdc++-v3/testsuite/29_atomics/atomic_float/compare_exchange_padding.cc 
b/libstdc++-v3/testsuite/29_atomics/atomic_float/compare_exchange_padding.cc
index 49626ac66511..9395e3026a7f 100644
--- a/libstdc++-v3/testsuite/29_atomics/atomic_float/compare_exchange_padding.cc
+++ b/libstdc++-v3/testsuite/29_atomics/atomic_float/compare_exchange_padding.cc
@@ -1,5 +1,6 @@
 // { dg-do run { target c++20 } }
 // { dg-options "-O0" }
+// { dg-require-effective-target libatomic_available }
 // { dg-additional-options "[atomic_link_flags [get_multilibs]] -latomic" }
 
 #include 


[gcc r14-11207] testsuite: The expect framework might introduce CR in output

2025-01-11 Thread Torbjorn Svensson via Libstdc++-cvs
https://gcc.gnu.org/g:f43a6bd08797eae0243b4110b2fbd4700a349ce7

commit r14-11207-gf43a6bd08797eae0243b4110b2fbd4700a349ce7
Author: Torbjörn SVENSSON 
Date:   Sat Jan 11 19:16:57 2025 +0100

testsuite: The expect framework might introduce CR in output

When running tests using the "sim" config, the command is launched in
non-readonly mode and the text retrieved from the expect command will
then replace all LF with CRLF. (The problem can be found in sim_load
where it calls remote_spawn without an input file).

libstdc++-v3/ChangeLog:

* testsuite/27_io/print/1.cc: Allow both LF and CRLF in test.
* testsuite/27_io/print/3.cc: Likewise.

Signed-off-by: Torbjörn SVENSSON 
(cherry picked from commit 4b29be7216daa5921aae340388ef6416b1631f0a)

Diff:
---
 libstdc++-v3/testsuite/27_io/print/1.cc | 2 +-
 libstdc++-v3/testsuite/27_io/print/3.cc | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/libstdc++-v3/testsuite/27_io/print/1.cc 
b/libstdc++-v3/testsuite/27_io/print/1.cc
index f6585d9880ae..2a74e5002f44 100644
--- a/libstdc++-v3/testsuite/27_io/print/1.cc
+++ b/libstdc++-v3/testsuite/27_io/print/1.cc
@@ -18,7 +18,7 @@ void
 test_println_default()
 {
   std::println("I walk the line");
-  // { dg-output "I walk the line\n" }
+  // { dg-output "I walk the line\r?\n" }
 }
 
 void
diff --git a/libstdc++-v3/testsuite/27_io/print/3.cc 
b/libstdc++-v3/testsuite/27_io/print/3.cc
index ffcf7337ce5d..90c4cfb0d48d 100644
--- a/libstdc++-v3/testsuite/27_io/print/3.cc
+++ b/libstdc++-v3/testsuite/27_io/print/3.cc
@@ -13,7 +13,7 @@ test_println_blank()
   std::print("1");
   std::println();
   std::println("2");
-  // { dg-output "1\n2" }
+  // { dg-output "1\r?\n2" }
 }
 
 void