public inbox for libstdc++-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r13-7163] libstdc++: Fix some AIX test failures
@ 2023-04-12 22:27 Jonathan Wakely
  0 siblings, 0 replies; only message in thread
From: Jonathan Wakely @ 2023-04-12 22:27 UTC (permalink / raw)
  To: gcc-cvs, libstdc++-cvs

https://gcc.gnu.org/g:25264f6b3a75f505c1ca3bc7e48ce173560c1b2c

commit r13-7163-g25264f6b3a75f505c1ca3bc7e48ce173560c1b2c
Author: Jonathan Wakely <jwakely@redhat.com>
Date:   Wed Apr 12 22:14:05 2023 +0100

    libstdc++: Fix some AIX test failures
    
    AIX <sys/thread.h> defines struct tstate with non-reserved names, so
    adjust the 17_intro/names.cc test. It also defines struct user, which
    conflicts with namespace user in some tests.
    
    Replacing the global operator new doesn't work on AIX the same way as it
    does for ELF, so skip some tests that depend on replacing it.
    
    Add missing DG directives to synchronized_value test so it doesn't run
    for the single-threaded AIX multilib.
    
    libstdc++-v3/ChangeLog:
    
            * testsuite/17_intro/names.cc [_AIX]: Do not define policy.
            * testsuite/19_diagnostics/error_code/cons/lwg3629.cc: Rename
            namespace to avoid clashing with libc struct.
            * testsuite/19_diagnostics/error_condition/cons/lwg3629.cc:
            Likewise.
            * testsuite/23_containers/unordered_map/96088.cc: Skip on AIX.
            * testsuite/23_containers/unordered_multimap/96088.cc: Likewise.
            * testsuite/23_containers/unordered_multiset/96088.cc: Likewise.
            * testsuite/23_containers/unordered_set/96088.cc: Likewise.
            * testsuite/experimental/synchronized_value.cc: Require gthreads
            and add missing option for pthreads targets.

Diff:
---
 libstdc++-v3/testsuite/17_intro/names.cc               |  2 ++
 .../19_diagnostics/error_code/cons/lwg3629.cc          | 18 +++++++++---------
 .../19_diagnostics/error_condition/cons/lwg3629.cc     | 18 +++++++++---------
 .../testsuite/23_containers/unordered_map/96088.cc     |  1 +
 .../23_containers/unordered_multimap/96088.cc          |  1 +
 .../23_containers/unordered_multiset/96088.cc          |  1 +
 .../testsuite/23_containers/unordered_set/96088.cc     |  1 +
 .../testsuite/experimental/synchronized_value.cc       |  2 ++
 8 files changed, 26 insertions(+), 18 deletions(-)

diff --git a/libstdc++-v3/testsuite/17_intro/names.cc b/libstdc++-v3/testsuite/17_intro/names.cc
index 9932dea14d5..eb4d064177c 100644
--- a/libstdc++-v3/testsuite/17_intro/names.cc
+++ b/libstdc++-v3/testsuite/17_intro/names.cc
@@ -243,6 +243,8 @@
 #undef v
 // <sys/timer.h> defines trb::func and cputime_tmr::func
 #undef func
+// <sys/thread.h> defines tstate::policy
+#undef policy
 #endif
 
 #ifdef __APPLE__
diff --git a/libstdc++-v3/testsuite/19_diagnostics/error_code/cons/lwg3629.cc b/libstdc++-v3/testsuite/19_diagnostics/error_code/cons/lwg3629.cc
index 70fa5e80503..bd7c6ce3d9e 100644
--- a/libstdc++-v3/testsuite/19_diagnostics/error_code/cons/lwg3629.cc
+++ b/libstdc++-v3/testsuite/19_diagnostics/error_code/cons/lwg3629.cc
@@ -3,18 +3,18 @@
 // 3629. make_error_code and make_error_condition are customization points
 // Verify that make_error_code is looked up using ADL only.
 
-namespace user
+namespace User
 {
   struct E1;
 }
 
 // N.B. not in associated namespace of E1, and declared before <system_error>.
-user::E1 make_error_code(user::E1);
+User::E1 make_error_code(User::E1);
 
 #include <future> // declares std::make_error_code(future_errc)
 #include <system_error>
 
-namespace user
+namespace User
 {
   struct E1
   {
@@ -32,17 +32,17 @@ namespace user
   };
 }
 
-template<> struct std::is_error_code_enum<user::E1> : std::true_type { };
-template<> struct std::is_error_code_enum<user::E2> : std::true_type { };
-template<> struct std::is_error_code_enum<user::E3> : std::true_type { };
+template<> struct std::is_error_code_enum<User::E1> : std::true_type { };
+template<> struct std::is_error_code_enum<User::E2> : std::true_type { };
+template<> struct std::is_error_code_enum<User::E3> : std::true_type { };
 
 // ::make_error_code(E1) should not be found by name lookup.
-std::error_code e1( user::E1{} ); // { dg-error "here" }
+std::error_code e1( User::E1{} ); // { dg-error "here" }
 
 // std::make_error_code(future_errc) should not be found by name lookup.
-std::error_code e2( user::E2{} ); // { dg-error "here" }
+std::error_code e2( User::E2{} ); // { dg-error "here" }
 
 // std::make_error_code(errc) should not be found by name lookup.
-std::error_code e3( user::E3{} ); // { dg-error "here" }
+std::error_code e3( User::E3{} ); // { dg-error "here" }
 
 // { dg-error "use of deleted function" "" { target *-*-* } 0 }
diff --git a/libstdc++-v3/testsuite/19_diagnostics/error_condition/cons/lwg3629.cc b/libstdc++-v3/testsuite/19_diagnostics/error_condition/cons/lwg3629.cc
index 562a99aee3b..d72163b1a07 100644
--- a/libstdc++-v3/testsuite/19_diagnostics/error_condition/cons/lwg3629.cc
+++ b/libstdc++-v3/testsuite/19_diagnostics/error_condition/cons/lwg3629.cc
@@ -3,18 +3,18 @@
 // 3629. make_error_code and make_error_condition are customization points
 // Verify that make_error_condition is looked up using ADL only.
 
-namespace user
+namespace User
 {
   struct E1;
 }
 
 // N.B. not in associated namespace of E1, and declared before <system_error>.
-user::E1 make_error_condition(user::E1);
+User::E1 make_error_condition(User::E1);
 
 #include <future> // declares std::make_error_condition(future_errc)
 #include <system_error>
 
-namespace user
+namespace User
 {
   struct E1
   {
@@ -32,17 +32,17 @@ namespace user
   };
 }
 
-template<> struct std::is_error_condition_enum<user::E1> : std::true_type { };
-template<> struct std::is_error_condition_enum<user::E2> : std::true_type { };
-template<> struct std::is_error_condition_enum<user::E3> : std::true_type { };
+template<> struct std::is_error_condition_enum<User::E1> : std::true_type { };
+template<> struct std::is_error_condition_enum<User::E2> : std::true_type { };
+template<> struct std::is_error_condition_enum<User::E3> : std::true_type { };
 
 // ::make_error_condition(E1) should not be found by name lookup.
-std::error_condition e1( user::E1{} ); // { dg-error "here" }
+std::error_condition e1( User::E1{} ); // { dg-error "here" }
 
 // std::make_error_condition(future_errc) should not be found by name lookup.
-std::error_condition e2( user::E2{} ); // { dg-error "here" }
+std::error_condition e2( User::E2{} ); // { dg-error "here" }
 
 // std::make_error_condition(errc) should not be found by name lookup.
-std::error_condition e3( user::E3{} ); // { dg-error "here" }
+std::error_condition e3( User::E3{} ); // { dg-error "here" }
 
 // { dg-error "use of deleted function" "" { target *-*-* } 0 }
diff --git a/libstdc++-v3/testsuite/23_containers/unordered_map/96088.cc b/libstdc++-v3/testsuite/23_containers/unordered_map/96088.cc
index 754b529c67c..c6d50c20fbf 100644
--- a/libstdc++-v3/testsuite/23_containers/unordered_map/96088.cc
+++ b/libstdc++-v3/testsuite/23_containers/unordered_map/96088.cc
@@ -1,5 +1,6 @@
 // { dg-do run { target c++17 } }
 // { dg-require-effective-target std_allocator_new }
+// { dg-xfail-run-if "AIX operator new" { powerpc-ibm-aix* } }
 
 // Copyright (C) 2021-2023 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/23_containers/unordered_multimap/96088.cc b/libstdc++-v3/testsuite/23_containers/unordered_multimap/96088.cc
index b55afdfd74a..214bc91a559 100644
--- a/libstdc++-v3/testsuite/23_containers/unordered_multimap/96088.cc
+++ b/libstdc++-v3/testsuite/23_containers/unordered_multimap/96088.cc
@@ -1,5 +1,6 @@
 // { dg-do run { target c++17 } }
 // { dg-require-effective-target std_allocator_new }
+// { dg-xfail-run-if "AIX operator new" { powerpc-ibm-aix* } }
 
 // Copyright (C) 2021-2023 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/23_containers/unordered_multiset/96088.cc b/libstdc++-v3/testsuite/23_containers/unordered_multiset/96088.cc
index d50435aa7a2..838ce8d5bc5 100644
--- a/libstdc++-v3/testsuite/23_containers/unordered_multiset/96088.cc
+++ b/libstdc++-v3/testsuite/23_containers/unordered_multiset/96088.cc
@@ -1,5 +1,6 @@
 // { dg-do run { target c++17 } }
 // { dg-require-effective-target std_allocator_new }
+// { dg-xfail-run-if "AIX operator new" { powerpc-ibm-aix* } }
 
 // Copyright (C) 2021-2023 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/23_containers/unordered_set/96088.cc b/libstdc++-v3/testsuite/23_containers/unordered_set/96088.cc
index 05a5dc07f62..0f7dce2b38c 100644
--- a/libstdc++-v3/testsuite/23_containers/unordered_set/96088.cc
+++ b/libstdc++-v3/testsuite/23_containers/unordered_set/96088.cc
@@ -1,5 +1,6 @@
 // { dg-do run { target c++17 } }
 // { dg-require-effective-target std_allocator_new }
+// { dg-xfail-run-if "AIX operator new" { powerpc-ibm-aix* } }
 
 // Copyright (C) 2021-2023 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/experimental/synchronized_value.cc b/libstdc++-v3/testsuite/experimental/synchronized_value.cc
index 8e8134699a2..a7e556c14ea 100644
--- a/libstdc++-v3/testsuite/experimental/synchronized_value.cc
+++ b/libstdc++-v3/testsuite/experimental/synchronized_value.cc
@@ -1,4 +1,6 @@
 // { dg-do run { target c++17 } }
+// { dg-additional-options "-pthread" { target pthread } }
+// { dg-require-gthreads "" }
 
 #include <experimental/synchronized_value>
 #include <testsuite_hooks.h>

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2023-04-12 22:27 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-04-12 22:27 [gcc r13-7163] libstdc++: Fix some AIX test failures Jonathan Wakely

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).