From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7577 invoked by alias); 20 Mar 2018 21:02:49 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 6670 invoked by uid 89); 20 Mar 2018 21:02:49 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-21.9 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,KAM_SHORT,RCVD_IN_DNSWL_NONE,SEM_URI,SEM_URIRED,SPF_PASS autolearn=ham version=3.3.2 spammy=1.cc, pr84998, 2cc, 2.cc X-Spam-User: qpsmtpd, 2 recipients X-HELO: mail-wr0-f177.google.com Received: from mail-wr0-f177.google.com (HELO mail-wr0-f177.google.com) (209.85.128.177) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 20 Mar 2018 21:02:47 +0000 Received: by mail-wr0-f177.google.com with SMTP id c24so3142134wrc.6; Tue, 20 Mar 2018 14:02:46 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language; bh=P+nTihJVPpFaSNch0RNf3OWQWSKstv4Jkt4bMRVZJkY=; b=eKUoPj1SV4ws9in7WcP9e8DvUCyS8qnDjoop3/F6PIcmscLGTarW+a+SpbCnrglVj4 bIQIm2vSci8QwpY46SQfPD6kx7FLF/Dz2cXOwCEmELQtI6QmdJccRiPwMindEVx9CKX4 +KdwOwp0FUJd/NbmzrYxpy1bhR48RyYnm2RL+85G0fM9rsZxjz3gBR0AEUv5liHi9vyl MAzblBpvg4BTBdM525EPp3Hu0dwwoRCgM2xcP66kaY/aS3VmZr2/87XInMK4LJmusHpP 433sLBR2x8rdio5NbBA5xBTxGzaweDS4UAiikhrZyctDVWPX6h/rFc3UuHSxGhCtAycq H3eA== X-Gm-Message-State: AElRT7G+BmJNkQ7sLmtfYr8CbEygiSfQiuAV2HbaR6G8Qq4tp4BZePxP ZtYPaH4KLcFTSW0l9PZTbVMx1A== X-Google-Smtp-Source: AG47ELuvGYw4lysLrSvQqcMgc4Y7KbOvYpYFKElWIrSptBNYMNA27gxy+2YBG7qasQ847TlJQYHwbg== X-Received: by 10.223.167.146 with SMTP id j18mr13871221wrc.222.1521579763743; Tue, 20 Mar 2018 14:02:43 -0700 (PDT) Received: from [192.168.0.23] (arf62-1-82-237-250-248.fbx.proxad.net. [82.237.250.248]) by smtp.googlemail.com with ESMTPSA id u62sm3379557wma.15.2018.03.20.14.02.42 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 20 Mar 2018 14:02:43 -0700 (PDT) Subject: Re: Results for 8.0.1 20180316 (experimental) [trunk revision 258610] (GCC) libstdc++ testsuite on x86_64-pc-linux-gnu To: libstdc++@gcc.gnu.org, gcc-patches References: <5aacd955.W97SAA9Qc1hoHlKB%jwakely.gcc@gmail.com> From: =?UTF-8?Q?Fran=c3=a7ois_Dumont?= Message-ID: <075b9c05-fc02-5d89-45ce-cde812bbca3f@gmail.com> Date: Tue, 20 Mar 2018 21:03:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/mixed; boundary="------------6E642F53609883816DB6FC25" X-SW-Source: 2018-03/txt/msg01022.txt.bz2 This is a multi-part message in MIME format. --------------6E642F53609883816DB6FC25 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-length: 1394 On 20/03/2018 19:20, Jonathan Wakely wrote: > On 17 March 2018 at 09:01, Jonathan Wakely wrote: >> Native configuration is x86_64-pc-linux-gnu >> >> === libstdc++ tests === >> >> >> Running target unix/-std=gnu++11/-D_GLIBCXX_ASSERTIONS >> >> === libstdc++ Summary for unix/-std=gnu++11/-D_GLIBCXX_ASSERTIONS === >> >> # of expected passes 12330 >> # of expected failures 71 >> # of unsupported tests 579 >> >> Running target unix/-std=gnu++11/-D_GLIBCXX_DEBUG >> XPASS: 21_strings/basic_string_view/element_access/char/2.cc execution test >> XPASS: 21_strings/basic_string_view/element_access/wchar_t/2.cc execution test >> FAIL: 23_containers/bitset/hash/1.cc (test for excess errors) >> UNRESOLVED: 23_containers/bitset/hash/1.cc compilation failed to produce executable > These debug mode failures are regressions, reported as > https://gcc.gnu.org/PR84998 > > I think they all have the same root cause (Nathan fixed a bug in G++). > I had already prepared this patch. Thanks for explaining why we have this problem now. Note that I chose to use full specialization with std::hash<> for std::bitset and std::vector. It also fix a versioned namespace issue when partially specializing std::hash for debug vector. Tested under Linux x86_64 normal, debug and versioned namespace modes. Ok to commit ? François --------------6E642F53609883816DB6FC25 Content-Type: text/x-patch; name="friend_declaration_debug.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="friend_declaration_debug.patch" Content-length: 5925 diff --git a/libstdc++-v3/include/bits/stl_bvector.h b/libstdc++-v3/include/bits/stl_bvector.h index fbf982f..05e9ff2 100644 --- a/libstdc++-v3/include/bits/stl_bvector.h +++ b/libstdc++-v3/include/bits/stl_bvector.h @@ -58,6 +58,7 @@ #if __cplusplus >= 201103L #include +#include #endif namespace std _GLIBCXX_VISIBILITY(default) @@ -593,7 +594,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER typedef typename _Base::_Bit_alloc_traits _Bit_alloc_traits; #if __cplusplus >= 201103L - template friend struct hash; + friend struct std::hash; #endif public: @@ -1321,8 +1322,6 @@ _GLIBCXX_END_NAMESPACE_VERSION #if __cplusplus >= 201103L -#include - namespace std _GLIBCXX_VISIBILITY(default) { _GLIBCXX_BEGIN_NAMESPACE_VERSION diff --git a/libstdc++-v3/include/bits/stl_map.h b/libstdc++-v3/include/bits/stl_map.h index 2632775..78ac087 100644 --- a/libstdc++-v3/include/bits/stl_map.h +++ b/libstdc++-v3/include/bits/stl_map.h @@ -633,7 +633,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER { return _M_t._M_reinsert_node_hint_unique(__hint, std::move(__nh)); } template - friend class _Rb_tree_merge_helper; + friend class std::_Rb_tree_merge_helper; template void diff --git a/libstdc++-v3/include/bits/stl_multimap.h b/libstdc++-v3/include/bits/stl_multimap.h index 31beb84..371cd43 100644 --- a/libstdc++-v3/include/bits/stl_multimap.h +++ b/libstdc++-v3/include/bits/stl_multimap.h @@ -651,7 +651,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER { return _M_t._M_reinsert_node_hint_equal(__hint, std::move(__nh)); } template - friend class _Rb_tree_merge_helper; + friend class std::_Rb_tree_merge_helper; template void diff --git a/libstdc++-v3/include/bits/stl_multiset.h b/libstdc++-v3/include/bits/stl_multiset.h index 1bba400..7286df6 100644 --- a/libstdc++-v3/include/bits/stl_multiset.h +++ b/libstdc++-v3/include/bits/stl_multiset.h @@ -589,7 +589,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER { return _M_t._M_reinsert_node_hint_equal(__hint, std::move(__nh)); } template - friend class _Rb_tree_merge_helper; + friend class std::_Rb_tree_merge_helper; template void diff --git a/libstdc++-v3/include/bits/stl_set.h b/libstdc++-v3/include/bits/stl_set.h index f79ab1c..b6b2fc4f 100644 --- a/libstdc++-v3/include/bits/stl_set.h +++ b/libstdc++-v3/include/bits/stl_set.h @@ -604,7 +604,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER { return _M_t._M_reinsert_node_hint_unique(__hint, std::move(__nh)); } template - friend class _Rb_tree_merge_helper; + friend class std::_Rb_tree_merge_helper; template void diff --git a/libstdc++-v3/include/bits/unordered_map.h b/libstdc++-v3/include/bits/unordered_map.h index b757ff2..07aad9e 100644 --- a/libstdc++-v3/include/bits/unordered_map.h +++ b/libstdc++-v3/include/bits/unordered_map.h @@ -862,7 +862,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER #if __cplusplus > 201402L template - friend class _Hash_merge_helper; + friend class std::_Hash_merge_helper; template void @@ -1742,7 +1742,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER #if __cplusplus > 201402L template - friend class _Hash_merge_helper; + friend class std::_Hash_merge_helper; template void diff --git a/libstdc++-v3/include/bits/unordered_set.h b/libstdc++-v3/include/bits/unordered_set.h index 77942a3..c9ac4ad 100644 --- a/libstdc++-v3/include/bits/unordered_set.h +++ b/libstdc++-v3/include/bits/unordered_set.h @@ -588,7 +588,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER #if __cplusplus > 201402L template - friend class _Hash_merge_helper; + friend class std::_Hash_merge_helper; template void @@ -1368,7 +1368,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER #if __cplusplus > 201402L template - friend class _Hash_merge_helper; + friend class std::_Hash_merge_helper; template void diff --git a/libstdc++-v3/include/debug/vector b/libstdc++-v3/include/debug/vector index fa79379..5289265 100644 --- a/libstdc++-v3/include/debug/vector +++ b/libstdc++-v3/include/debug/vector @@ -770,6 +770,8 @@ namespace __debug } // namespace __debug #if __cplusplus >= 201103L +_GLIBCXX_BEGIN_NAMESPACE_VERSION + // DR 1182. /// std::hash specialization for vector. template @@ -780,6 +782,8 @@ namespace __debug operator()(const __debug::vector& __b) const noexcept { return std::hash<_GLIBCXX_STD_C::vector>()(__b); } }; + +_GLIBCXX_END_NAMESPACE_VERSION #endif } // namespace std diff --git a/libstdc++-v3/include/std/bitset b/libstdc++-v3/include/std/bitset index 630602d..e598ea3 100644 --- a/libstdc++-v3/include/std/bitset +++ b/libstdc++-v3/include/std/bitset @@ -50,6 +50,10 @@ #include #include +#if __cplusplus >= 201103L +# include +#endif + #define _GLIBCXX_BITSET_BITS_PER_WORD (__CHAR_BIT__ * __SIZEOF_LONG__) #define _GLIBCXX_BITSET_WORDS(__n) \ ((__n) / _GLIBCXX_BITSET_BITS_PER_WORD + \ @@ -779,7 +783,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER } #if __cplusplus >= 201103L - template friend struct hash; + friend struct std::hash; #endif public: @@ -1549,8 +1553,6 @@ _GLIBCXX_END_NAMESPACE_CONTAINER #if __cplusplus >= 201103L -#include - namespace std _GLIBCXX_VISIBILITY(default) { _GLIBCXX_BEGIN_NAMESPACE_VERSION --------------6E642F53609883816DB6FC25--