From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [207.211.31.120]) by sourceware.org (Postfix) with ESMTP id B564D3861870 for ; Tue, 11 Aug 2020 15:39:11 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org B564D3861870 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-183-94Cl9vN_Mx---uTzr_PzRA-1; Tue, 11 Aug 2020 11:39:07 -0400 X-MC-Unique: 94Cl9vN_Mx---uTzr_PzRA-1 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 93E87100CCC0; Tue, 11 Aug 2020 15:39:06 +0000 (UTC) Received: from localhost (unknown [10.33.36.145]) by smtp.corp.redhat.com (Postfix) with ESMTP id 2ACB21002380; Tue, 11 Aug 2020 15:39:05 +0000 (UTC) Date: Tue, 11 Aug 2020 16:39:05 +0100 From: Jonathan Wakely To: libstdc++@gcc.gnu.org, gcc-patches@gcc.gnu.org Subject: [committed] libstdc++: Fix failing tests for AIX Message-ID: <20200811153905.GA3122307@redhat.com> MIME-Version: 1.0 X-Clacks-Overhead: GNU Terry Pratchett X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: multipart/mixed; boundary="YZ5djTAD1cGYuMQK" Content-Disposition: inline X-Spam-Status: No, score=-14.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_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=unavailable autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Aug 2020 15:39:12 -0000 --YZ5djTAD1cGYuMQK Content-Type: text/plain; charset=us-ascii Content-Disposition: inline These two tests fail on AIX because defines struct thread in the global namespace (despite it not being a reserved name). That means the using-declaration that adds it to the global namespace causes a redeclaration error. libstdc++-v3/ChangeLog: * testsuite/30_threads/thread/cons/84535.cc: Use a custom namespace. * testsuite/30_threads/thread/cons/lwg2097.cc: Likewise. Tested powerpc64le-linux and powerpc-aix. Committed to trunk. --YZ5djTAD1cGYuMQK Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="patch.txt" commit fe8d7fec4db838cae536eeef1965db83959cf6ee Author: Jonathan Wakely Date: Tue Aug 11 16:16:22 2020 libstdc++: Fix failing tests for AIX These two tests fail on AIX because defines struct thread in the global namespace (despite it not being a reserved name). That means the using-declaration that adds it to the global namespace causes a redeclaration error. libstdc++-v3/ChangeLog: * testsuite/30_threads/thread/cons/84535.cc: Use a custom namespace. * testsuite/30_threads/thread/cons/lwg2097.cc: Likewise. diff --git a/libstdc++-v3/testsuite/30_threads/thread/cons/84535.cc b/libstdc++-v3/testsuite/30_threads/thread/cons/84535.cc index 7846d3f7b68..711687b4f5c 100644 --- a/libstdc++-v3/testsuite/30_threads/thread/cons/84535.cc +++ b/libstdc++-v3/testsuite/30_threads/thread/cons/84535.cc @@ -20,6 +20,8 @@ #include +namespace __gnu_test +{ using std::is_constructible; using std::thread; @@ -28,3 +30,4 @@ static_assert(!is_constructible::value, ""); static_assert(!is_constructible::value, ""); static_assert(!is_constructible::value, ""); static_assert(!is_constructible::value, ""); +} diff --git a/libstdc++-v3/testsuite/30_threads/thread/cons/lwg2097.cc b/libstdc++-v3/testsuite/30_threads/thread/cons/lwg2097.cc index e0d588e51f9..1ad2a76cb58 100644 --- a/libstdc++-v3/testsuite/30_threads/thread/cons/lwg2097.cc +++ b/libstdc++-v3/testsuite/30_threads/thread/cons/lwg2097.cc @@ -20,9 +20,12 @@ #include +namespace __gnu_test +{ using std::thread; using std::is_constructible; static_assert( !is_constructible::value, "" ); static_assert( !is_constructible::value, "" ); static_assert( !is_constructible::value, "" ); +} --YZ5djTAD1cGYuMQK--