From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTPS id 7881A3858C60 for ; Wed, 12 Apr 2023 22:30:35 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 7881A3858C60 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1681338635; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=BX0t7IL4l5Qih64vS/VhP8xccANNp1DDDUN5jAV2Jyg=; b=ENohSvpZIn5UNtWCWCBkmSwKGGP1Vf9iTkpB+3pl1NcHMmxqw9f9m2l6KIA/VC0bQbPsTX 9aVLimF7PbmwW9k/fYgS0cfDGIUUJf6ooJjo7Qhtaj4SJxRnSNrrAbcdDW7kwyo0VWQ5H5 xT+575CZ8i7qXtPhsTMALdEsjA7lVAE= Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-536-0rqsf201PcWwGC2gczYTjQ-1; Wed, 12 Apr 2023 18:30:33 -0400 X-MC-Unique: 0rqsf201PcWwGC2gczYTjQ-1 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 988E83850544; Wed, 12 Apr 2023 22:30:33 +0000 (UTC) Received: from localhost (unknown [10.33.36.10]) by smtp.corp.redhat.com (Postfix) with ESMTP id 6173D1121320; Wed, 12 Apr 2023 22:30:33 +0000 (UTC) From: Jonathan Wakely To: libstdc++@gcc.gnu.org, gcc-patches@gcc.gnu.org Subject: [committed] libstdc++: Fix some AIX test failures Date: Wed, 12 Apr 2023 23:30:36 +0100 Message-Id: <20230412223036.207238-1-jwakely@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.3 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-12.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,GIT_PATCH_0,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: Tested x86_64-linux and powerpc-aix. Pushed to trunk. -- >8 -- AIX 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. --- libstdc++-v3/testsuite/17_intro/names.cc | 2 ++ .../19_diagnostics/error_code/cons/lwg3629.cc | 18 +++++++++--------- .../error_condition/cons/lwg3629.cc | 18 +++++++++--------- .../23_containers/unordered_map/96088.cc | 1 + .../23_containers/unordered_multimap/96088.cc | 1 + .../23_containers/unordered_multiset/96088.cc | 1 + .../23_containers/unordered_set/96088.cc | 1 + .../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 // defines trb::func and cputime_tmr::func #undef func +// 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 . -user::E1 make_error_code(user::E1); +User::E1 make_error_code(User::E1); #include // declares std::make_error_code(future_errc) #include -namespace user +namespace User { struct E1 { @@ -32,17 +32,17 @@ namespace user }; } -template<> struct std::is_error_code_enum : std::true_type { }; -template<> struct std::is_error_code_enum : std::true_type { }; -template<> struct std::is_error_code_enum : std::true_type { }; +template<> struct std::is_error_code_enum : std::true_type { }; +template<> struct std::is_error_code_enum : std::true_type { }; +template<> struct std::is_error_code_enum : 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 . -user::E1 make_error_condition(user::E1); +User::E1 make_error_condition(User::E1); #include // declares std::make_error_condition(future_errc) #include -namespace user +namespace User { struct E1 { @@ -32,17 +32,17 @@ namespace user }; } -template<> struct std::is_error_condition_enum : std::true_type { }; -template<> struct std::is_error_condition_enum : std::true_type { }; -template<> struct std::is_error_condition_enum : std::true_type { }; +template<> struct std::is_error_condition_enum : std::true_type { }; +template<> struct std::is_error_condition_enum : std::true_type { }; +template<> struct std::is_error_condition_enum : 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 #include -- 2.39.2