diff options
author | Martin Liska <mliska@suse.cz> | 2021-06-02 14:46:33 +0200 |
---|---|---|
committer | Martin Liska <mliska@suse.cz> | 2021-06-02 14:46:33 +0200 |
commit | 0d9e5270f10a21bd5549f3dd12a3b0c7c5f83362 (patch) | |
tree | 0a0afe6d4df72458ad39c2ef0e10716c3914136a | |
parent | fcea5603e57e3f8c17ca259f36bd92c0e0bd8f35 (diff) | |
parent | f8f0193b5b83f6e85d65015e79c803295baf5166 (diff) | |
download | gcc-0d9e5270f10a21bd5549f3dd12a3b0c7c5f83362.zip gcc-0d9e5270f10a21bd5549f3dd12a3b0c7c5f83362.tar.gz gcc-0d9e5270f10a21bd5549f3dd12a3b0c7c5f83362.tar.bz2 |
Merge branch 'master' into devel/sphinx
-rw-r--r-- | gcc/config/arc/arc.h | 2 | ||||
-rw-r--r-- | gcc/config/s390/s390.md | 14 | ||||
-rw-r--r-- | gcc/config/s390/subst.md | 2 | ||||
-rw-r--r-- | gcc/testsuite/g++.dg/ext/builtin-shufflevector-1.C | 1 | ||||
-rw-r--r-- | gcc/testsuite/gcc.target/s390/ashr.c | 11 | ||||
-rw-r--r-- | gcc/testsuite/gfortran.dg/gomp/taskloop-2.f90 | 72 | ||||
-rw-r--r-- | libstdc++-v3/doc/html/manual/abi.html | 16 | ||||
-rw-r--r-- | libstdc++-v3/doc/html/manual/facets.html | 2 | ||||
-rw-r--r-- | libstdc++-v3/doc/html/manual/status.html | 18 | ||||
-rw-r--r-- | libstdc++-v3/doc/xml/manual/status_cxxis29124.xml | 6 | ||||
-rw-r--r-- | libstdc++-v3/doc/xml/manual/status_cxxtr1.xml | 6 | ||||
-rw-r--r-- | libstdc++-v3/doc/xml/manual/status_cxxtr24733.xml | 7 | ||||
-rw-r--r-- | libstdc++-v3/include/bits/hashtable_policy.h | 6 | ||||
-rw-r--r-- | libstdc++-v3/testsuite/23_containers/unordered_map/96088.cc | 22 | ||||
-rw-r--r-- | libstdc++-v3/testsuite/23_containers/unordered_map/allocator/default_init.cc | 1 | ||||
-rw-r--r-- | libstdc++-v3/testsuite/23_containers/unordered_set/96088.cc | 22 | ||||
-rw-r--r-- | libstdc++-v3/testsuite/23_containers/unordered_set/allocator/default_init.cc | 1 |
17 files changed, 152 insertions, 57 deletions
diff --git a/gcc/config/arc/arc.h b/gcc/config/arc/arc.h index bd1fe0a..252241a 100644 --- a/gcc/config/arc/arc.h +++ b/gcc/config/arc/arc.h @@ -34,7 +34,7 @@ along with GCC; see the file COPYING3. If not see #define SYMBOL_FLAG_CMEM (SYMBOL_FLAG_MACH_DEP << 3) #ifndef TARGET_CPU_DEFAULT -#define TARGET_CPU_DEFAULT PROCESSOR_arc700 +#define TARGET_CPU_DEFAULT PROCESSOR_hs38_linux #endif /* Check if this symbol has a long_call attribute in its declaration */ diff --git a/gcc/config/s390/s390.md b/gcc/config/s390/s390.md index 7faf775..0c5b4dc 100644 --- a/gcc/config/s390/s390.md +++ b/gcc/config/s390/s390.md @@ -9328,19 +9328,13 @@ "" "") -; FIXME: The number of alternatives is doubled here to match the fix -; number of 2 in the subst pattern for the (clobber (match_scratch... -; The right fix should be to support match_scratch in the output -; pattern of a define_subst. (define_insn "*ashrdi3_31<setcc><cconly>" - [(set (match_operand:DI 0 "register_operand" "=d, d") - (ashiftrt:DI (match_operand:DI 1 "register_operand" "0, 0") - (match_operand:QI 2 "shift_count_operand" "jsc,jsc"))) + [(set (match_operand:DI 0 "register_operand" "=d") + (ashiftrt:DI (match_operand:DI 1 "register_operand" "0") + (match_operand:QI 2 "shift_count_operand" "jsc"))) (clobber (reg:CC CC_REGNUM))] "!TARGET_ZARCH" - "@ - srda\t%0,%Y2 - srda\t%0,%Y2" + "srda\t%0,%Y2" [(set_attr "op_type" "RS") (set_attr "atype" "reg")]) diff --git a/gcc/config/s390/subst.md b/gcc/config/s390/subst.md index 384af11..3ea6fc4 100644 --- a/gcc/config/s390/subst.md +++ b/gcc/config/s390/subst.md @@ -45,7 +45,7 @@ "s390_match_ccmode(insn, CCSmode)" [(set (reg CC_REGNUM) (compare (match_dup 1) (const_int 0))) - (clobber (match_scratch:DSI 0 "=d,d"))]) + (clobber (match_scratch:DSI 0 "=d"))]) (define_subst_attr "cconly" "cconly_subst" "" "_cconly") diff --git a/gcc/testsuite/g++.dg/ext/builtin-shufflevector-1.C b/gcc/testsuite/g++.dg/ext/builtin-shufflevector-1.C index da838e8..3869531 100644 --- a/gcc/testsuite/g++.dg/ext/builtin-shufflevector-1.C +++ b/gcc/testsuite/g++.dg/ext/builtin-shufflevector-1.C @@ -1,4 +1,5 @@ // { dg-do compile { target c++11 } } +// { dg-options "-Wno-psabi -w" } template <typename T1, typename T2, int ...args> struct shufflevector diff --git a/gcc/testsuite/gcc.target/s390/ashr.c b/gcc/testsuite/gcc.target/s390/ashr.c new file mode 100644 index 0000000..8cffdfa --- /dev/null +++ b/gcc/testsuite/gcc.target/s390/ashr.c @@ -0,0 +1,11 @@ +/* Test the arithmetic shift right pattern. */ + +/* { dg-do compile } */ +/* { dg-options "-O2" } */ + +int e(void); + +int f (long c, int b) +{ + return (c >> b) && e (); +} diff --git a/gcc/testsuite/gfortran.dg/gomp/taskloop-2.f90 b/gcc/testsuite/gfortran.dg/gomp/taskloop-2.f90 new file mode 100644 index 0000000..2142762 --- /dev/null +++ b/gcc/testsuite/gfortran.dg/gomp/taskloop-2.f90 @@ -0,0 +1,72 @@ +subroutine foo() +implicit none +integer :: i, r +!$omp taskloop reduction(task, +: r) ! { dg-error "Only DEFAULT permitted as reduction-modifier in REDUCTION clause" } +do i = 1, 64 +end do +!$omp taskloop simd reduction(task, +: r) ! { dg-error "Only DEFAULT permitted as reduction-modifier in REDUCTION clause" } +do i = 1, 64 +end do +!$omp master taskloop reduction(task, +: r) ! { dg-error "Only DEFAULT permitted as reduction-modifier in REDUCTION clause" } +do i = 1, 64 +end do +!$omp master taskloop simd reduction(task, +: r) ! { dg-error "Only DEFAULT permitted as reduction-modifier in REDUCTION clause" } +do i = 1, 64 +end do +!$omp parallel master taskloop reduction(task, +: r) ! { dg-error "Only DEFAULT permitted as reduction-modifier in REDUCTION clause" } +do i = 1, 64 +end do +!$omp parallel master taskloop simd reduction(task, +: r) ! { dg-error "Only DEFAULT permitted as reduction-modifier in REDUCTION clause" } +do i = 1, 64 +end do + +!$omp taskloop reduction(inscan, +: r) ! { dg-error "'inscan' REDUCTION clause on construct other than DO, SIMD, DO SIMD, PARALLEL DO, PARALLEL DO SIMD" } +do i = 1, 64 ! { dg-error "OMP SCAN between two structured-block-sequences" "" { target *-*-* } .-1 } +end do +!$omp taskloop simd reduction(inscan, +: r) ! { dg-error "'inscan' REDUCTION clause on construct other than DO, SIMD, DO SIMD, PARALLEL DO, PARALLEL DO SIMD" } +do i = 1, 64 ! { dg-error "OMP SCAN between two structured-block-sequences" "" { target *-*-* } .-1 } +end do +!$omp master taskloop reduction(inscan, +: r) ! { dg-error "'inscan' REDUCTION clause on construct other than DO, SIMD, DO SIMD, PARALLEL DO, PARALLEL DO SIMD" } +do i = 1, 64 +end do +!$omp master taskloop simd reduction(inscan, +: r) ! { dg-error "'inscan' REDUCTION clause on construct other than DO, SIMD, DO SIMD, PARALLEL DO, PARALLEL DO SIMD" } +do i = 1, 64 +end do +!$omp parallel master taskloop reduction(inscan, +: r) ! { dg-error "'inscan' REDUCTION clause on construct other than DO, SIMD, DO SIMD, PARALLEL DO, PARALLEL DO SIMD" } +do i = 1, 64 ! { dg-error "OMP SCAN between two structured-block-sequences" "" { target *-*-* } .-1 } +end do +!$omp parallel master taskloop simd reduction(inscan, +: r) ! { dg-error "'inscan' REDUCTION clause on construct other than DO, SIMD, DO SIMD, PARALLEL DO, PARALLEL DO SIMD" } +do i = 1, 64 ! { dg-error "OMP SCAN between two structured-block-sequences" "" { target *-*-* } .-1 } +end do +end + + +subroutine bar() +implicit none +integer :: i, r +r = 0 +!$omp parallel reduction(+:r) + !$omp master taskloop in_reduction(+:r) + do i = 1, 64 + end do + !$omp master taskloop simd in_reduction(+:r) + do i = 1, 64 + end do + !$omp master + !$omp taskloop in_reduction(+:r) + do i = 1, 64 + end do + !$omp taskloop simd in_reduction(+:r) + do i = 1, 64 + end do + !$omp end master +!$omp end parallel + +!$omp parallel master taskloop in_reduction(+:r) ! { dg-error "Failed to match clause" } + do i = 1, 64 + end do + +!$omp parallel master taskloop simd in_reduction(+:r) ! { dg-error "Failed to match clause" } + do i = 1, 64 + end do +end diff --git a/libstdc++-v3/doc/html/manual/abi.html b/libstdc++-v3/doc/html/manual/abi.html index 0b9928c..82b03fd 100644 --- a/libstdc++-v3/doc/html/manual/abi.html +++ b/libstdc++-v3/doc/html/manual/abi.html @@ -534,39 +534,39 @@ gcc test.c -g -O2 -L. -lone -ltwo /usr/lib/libstdc++.so.5 /usr/lib/libstdc++.so. <a class="link" href="https://itanium-cxx-abi.github.io/cxx-abi/" target="_top"> Itanium C++ ABI </a> - </em>. </span></p></div><div class="biblioentry"><a id="id-1.3.6.3.6.10.5"></a><p><span class="title"><em> + </em>. </span></p></div><div class="biblioentry"><a id="id-1.3.6.3.6.10.4"></a><p><span class="title"><em> <a class="link" href="https://docs.oracle.com/cd/E23824_01/html/819-0690/index.html" target="_top"> Linker and Libraries Guide (document 819-0690) </a> - </em>. </span></p></div><div class="biblioentry"><a id="id-1.3.6.3.6.10.6"></a><p><span class="title"><em> + </em>. </span></p></div><div class="biblioentry"><a id="id-1.3.6.3.6.10.5"></a><p><span class="title"><em> <a class="link" href="https://docs.oracle.com/cd/E19422-01/819-3689/" target="_top"> Sun Studio 11: C++ Migration Guide (document 819-3689) </a> - </em>. </span></p></div><div class="biblioentry"><a id="id-1.3.6.3.6.10.7"></a><p><span class="title"><em> + </em>. </span></p></div><div class="biblioentry"><a id="id-1.3.6.3.6.10.6"></a><p><span class="title"><em> <a class="link" href="https://www.akkadia.org/drepper/dsohowto.pdf" target="_top"> How to Write Shared Libraries </a> - </em>. </span><span class="author"><span class="firstname">Ulrich</span> <span class="surname">Drepper</span>. </span></p></div><div class="biblioentry"><a id="id-1.3.6.3.6.10.8"></a><p><span class="title"><em> + </em>. </span><span class="author"><span class="firstname">Ulrich</span> <span class="surname">Drepper</span>. </span></p></div><div class="biblioentry"><a id="id-1.3.6.3.6.10.7"></a><p><span class="title"><em> <a class="link" href="https://developer.arm.com/documentation/ihi0036/latest/" target="_top"> C++ ABI for the ARM Architecture </a> - </em>. </span></p></div><div class="biblioentry"><a id="id-1.3.6.3.6.10.9"></a><p><span class="title"><em> + </em>. </span></p></div><div class="biblioentry"><a id="id-1.3.6.3.6.10.8"></a><p><span class="title"><em> <a class="link" href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2006/n1976.html" target="_top"> Dynamic Shared Objects: Survey and Issues </a> </em>. </span><span class="subtitle"> ISO C++ J16/06-0046 - . </span><span class="author"><span class="firstname">Benjamin</span> <span class="surname">Kosnik</span>. </span></p></div><div class="biblioentry"><a id="id-1.3.6.3.6.10.10"></a><p><span class="title"><em> + . </span><span class="author"><span class="firstname">Benjamin</span> <span class="surname">Kosnik</span>. </span></p></div><div class="biblioentry"><a id="id-1.3.6.3.6.10.9"></a><p><span class="title"><em> <a class="link" href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2006/n2013.html" target="_top"> Versioning With Namespaces </a> </em>. </span><span class="subtitle"> ISO C++ J16/06-0083 - . </span><span class="author"><span class="firstname">Benjamin</span> <span class="surname">Kosnik</span>. </span></p></div><div class="biblioentry"><a id="id-1.3.6.3.6.10.11"></a><p><span class="title"><em> + . </span><span class="author"><span class="firstname">Benjamin</span> <span class="surname">Kosnik</span>. </span></p></div><div class="biblioentry"><a id="id-1.3.6.3.6.10.10"></a><p><span class="title"><em> <a class="link" href="http://syrcose.ispras.ru/2009/files/02_paper.pdf" target="_top"> Binary Compatibility of Shared Libraries Implemented in C++ on GNU/Linux Systems </a> </em>. </span><span class="subtitle"> SYRCoSE 2009 - . </span><span class="author"><span class="firstname">Pavel</span> <span class="surname">Shved</span>. </span><span class="author"><span class="firstname">Denis</span> <span class="surname">Silakov</span>. </span></p></div></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="test.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="appendix_porting.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="api.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Testing </td><td width="20%" align="center"><a accesskey="h" href="../index.html">Home</a></td><td width="40%" align="right" valign="top"> API Evolution and Deprecation History</td></tr></table></div></body></html> + . </span><span class="author"><span class="firstname">Pavel</span> <span class="surname">Shved</span>. </span><span class="author"><span class="firstname">Denis</span> <span class="surname">Silakov</span>. </span></p></div></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="test.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="appendix_porting.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="api.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Testing </td><td width="20%" align="center"><a accesskey="h" href="../index.html">Home</a></td><td width="40%" align="right" valign="top"> API Evolution and Deprecation History</td></tr></table></div></body></html>
\ No newline at end of file diff --git a/libstdc++-v3/doc/html/manual/facets.html b/libstdc++-v3/doc/html/manual/facets.html index 90f2e26..e340a5e 100644 --- a/libstdc++-v3/doc/html/manual/facets.html +++ b/libstdc++-v3/doc/html/manual/facets.html @@ -748,4 +748,4 @@ java.util.Locale, java.util.ResourceBundle </td><td width="20%" align="center"><a accesskey="h" href="../index.html">Home</a></td><td width="40%" align="right" valign="top"> Chapter 9. Containers -</td></tr></table></div></body></html> +</td></tr></table></div></body></html>
\ No newline at end of file diff --git a/libstdc++-v3/doc/html/manual/status.html b/libstdc++-v3/doc/html/manual/status.html index b9efe65..dee6c3a 100644 --- a/libstdc++-v3/doc/html/manual/status.html +++ b/libstdc++-v3/doc/html/manual/status.html @@ -1690,9 +1690,9 @@ Note 1: This feature is supported in older releases but the <code class="code">__cpp_lib</code> macro is not defined to the right value (or not defined at all) until the version shown in parentheses. </p></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a id="status.iso.tr1"></a>C++ TR1</h3></div></div></div><p> -This table is based on the table of contents of ISO/IEC DTR 19768 -Doc No: N1836=05-0096 Date: 2005-06-24 -Draft Technical Report on C++ Library Extensions +This table is based on the table of contents of ISO/IEC DTR 19768, +Doc No: N1836=05-0096, Date: 2005-06-24, +"Draft Technical Report on C++ Library Extensions". </p><p> In this implementation the header names are prefixed by <code class="code">tr1/</code>, for instance <code class="code"><tr1/functional></code>, @@ -1715,9 +1715,9 @@ release. <code class="literal">Assignable</code>. </p></div></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a id="status.iso.tr24733"></a>C++ TR 24733</h3></div></div></div><p> This table is based on the table of contents of -ISO/IEC TR 24733 Date: 2009-08-28 -Extension for the programming language C++ to support -decimal floating-point arithmetic +ISO/IEC TR 24733:2011, +"Extensions for the programming language C++ to support +decimal floating-point arithmetic". </p><p> This page describes the TR 24733 support in mainline GCC, not in any particular release. @@ -1742,9 +1742,9 @@ particular release. </td><td colspan="3" align="left"> <span class="emphasis"><em>Notes on C compatibility</em></span> </td></tr></tbody></table></div></div><br class="table-break" /></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a id="status.iso.specfun"></a>C++ IS 29124</h3></div></div></div><p> -This table is based on the table of contents of ISO/IEC FDIS 29124 -Doc No: N3060 Date: 2010-03-06 -Extensions to the C++ Library to support mathematical special functions +This table is based on the table of contents of ISO/IEC FDIS 29124, +Doc No: N3060, Date: 2010-03-06, +"Extensions to the C++ Library to support mathematical special functions". </p><p> Complete support for IS 29124 is in GCC 6.1 and later releases, when using at least C++11 (for older releases or C++98/C++03 use TR1 instead). diff --git a/libstdc++-v3/doc/xml/manual/status_cxxis29124.xml b/libstdc++-v3/doc/xml/manual/status_cxxis29124.xml index 40a90fc..2d9baa1 100644 --- a/libstdc++-v3/doc/xml/manual/status_cxxis29124.xml +++ b/libstdc++-v3/doc/xml/manual/status_cxxis29124.xml @@ -10,9 +10,9 @@ </info> <para> -This table is based on the table of contents of ISO/IEC FDIS 29124 -Doc No: N3060 Date: 2010-03-06 -Extensions to the C++ Library to support mathematical special functions +This table is based on the table of contents of ISO/IEC FDIS 29124, +Doc No: N3060, Date: 2010-03-06, +"Extensions to the C++ Library to support mathematical special functions". </para> <para> diff --git a/libstdc++-v3/doc/xml/manual/status_cxxtr1.xml b/libstdc++-v3/doc/xml/manual/status_cxxtr1.xml index 021cb63..addfd1f2 100644 --- a/libstdc++-v3/doc/xml/manual/status_cxxtr1.xml +++ b/libstdc++-v3/doc/xml/manual/status_cxxtr1.xml @@ -10,9 +10,9 @@ </info> <para> -This table is based on the table of contents of ISO/IEC DTR 19768 -Doc No: N1836=05-0096 Date: 2005-06-24 -Draft Technical Report on C++ Library Extensions +This table is based on the table of contents of ISO/IEC DTR 19768, +Doc No: N1836=05-0096, Date: 2005-06-24, +"Draft Technical Report on C++ Library Extensions". </para> <para> diff --git a/libstdc++-v3/doc/xml/manual/status_cxxtr24733.xml b/libstdc++-v3/doc/xml/manual/status_cxxtr24733.xml index 139b944..f64dc98 100644 --- a/libstdc++-v3/doc/xml/manual/status_cxxtr24733.xml +++ b/libstdc++-v3/doc/xml/manual/status_cxxtr24733.xml @@ -5,14 +5,15 @@ <info><title>C++ TR 24733</title> <keywordset> <keyword>TR 24733</keyword> + <keyword>decimal floating-point</keyword> </keywordset> </info> <para> This table is based on the table of contents of -ISO/IEC TR 24733 Date: 2009-08-28 -Extension for the programming language C++ to support -decimal floating-point arithmetic +ISO/IEC TR 24733:2011, +"Extensions for the programming language C++ to support +decimal floating-point arithmetic". </para> <para> diff --git a/libstdc++-v3/include/bits/hashtable_policy.h b/libstdc++-v3/include/bits/hashtable_policy.h index 1090a39..2130c95 100644 --- a/libstdc++-v3/include/bits/hashtable_policy.h +++ b/libstdc++-v3/include/bits/hashtable_policy.h @@ -1162,7 +1162,7 @@ namespace __detail struct _Hashtable_ebo_helper<_Nm, _Tp, true> : private _Tp { - _Hashtable_ebo_helper() = default; + _Hashtable_ebo_helper() noexcept(noexcept(_Tp())) : _Tp() { } template<typename _OtherTp> _Hashtable_ebo_helper(_OtherTp&& __tp) @@ -1188,7 +1188,7 @@ namespace __detail _Tp& _M_get() { return _M_tp; } private: - _Tp _M_tp; + _Tp _M_tp{}; }; /** @@ -1246,6 +1246,7 @@ namespace __detail // We need the default constructor for the local iterators and _Hashtable // default constructor. _Hash_code_base() = default; + _Hash_code_base(const _Hash& __hash) : __ebo_hash(__hash) { } __hash_code @@ -1639,6 +1640,7 @@ namespace __detail protected: _Hashtable_base() = default; + _Hashtable_base(const _Hash& __hash, const _Equal& __eq) : __hash_code_base(__hash), _EqualEBO(__eq) { } diff --git a/libstdc++-v3/testsuite/23_containers/unordered_map/96088.cc b/libstdc++-v3/testsuite/23_containers/unordered_map/96088.cc index e552b04..83ca1c0 100644 --- a/libstdc++-v3/testsuite/23_containers/unordered_map/96088.cc +++ b/libstdc++-v3/testsuite/23_containers/unordered_map/96088.cc @@ -222,7 +222,8 @@ test03() std::vector<std::pair<std::string, int>> v; v.insert(v.end(), lst.begin(), lst.end()); - auto __offset = __gnu_test::counter::count(); + const auto origin = __gnu_test::counter::count(); + { __gnu_test::counter::reset(); std::unordered_map<std::string, int, @@ -231,15 +232,19 @@ test03() um.insert(v.begin(), v.end()); VERIFY( um.size() == 1 ); - VERIFY( __gnu_test::counter::count() - __offset == 3 ); - VERIFY( __gnu_test::counter::get()._M_increments == 3 ); + // Allocate array of buckets, a node, and the std::string (unless COW). + constexpr std::size_t increments = _GLIBCXX_USE_CXX11_ABI ? 3 : 2; + + VERIFY( __gnu_test::counter::count() == origin + increments ); + VERIFY( __gnu_test::counter::get()._M_increments == increments ); um.insert(v.begin(), v.end()); VERIFY( um.size() == 1 ); - VERIFY( __gnu_test::counter::count() - __offset == 3 ); - VERIFY( __gnu_test::counter::get()._M_increments == 3 ); + VERIFY( __gnu_test::counter::count() == origin + increments ); + VERIFY( __gnu_test::counter::get()._M_increments == increments ); } + VERIFY( __gnu_test::counter::count() == origin ); { __gnu_test::counter::reset(); @@ -250,8 +255,11 @@ test03() std::make_move_iterator(v.end())); VERIFY( um.size() == 1 ); - VERIFY( __gnu_test::counter::count() - __offset == 2 ); - VERIFY( __gnu_test::counter::get()._M_increments == 2 ); + // Allocate array of buckets and a node. String is moved. + constexpr std::size_t increments = 2; + + VERIFY( __gnu_test::counter::count() == origin + increments ); + VERIFY( __gnu_test::counter::get()._M_increments == increments ); } } diff --git a/libstdc++-v3/testsuite/23_containers/unordered_map/allocator/default_init.cc b/libstdc++-v3/testsuite/23_containers/unordered_map/allocator/default_init.cc index bbfd683..12f1163 100644 --- a/libstdc++-v3/testsuite/23_containers/unordered_map/allocator/default_init.cc +++ b/libstdc++-v3/testsuite/23_containers/unordered_map/allocator/default_init.cc @@ -17,7 +17,6 @@ // { dg-do run { target c++11 } } // { dg-options "-O0" } -// { dg-xfail-run-if "PR c++/65816" { *-*-* } } #include <unordered_map> #include <testsuite_hooks.h> diff --git a/libstdc++-v3/testsuite/23_containers/unordered_set/96088.cc b/libstdc++-v3/testsuite/23_containers/unordered_set/96088.cc index efb2f9e..83d5475 100644 --- a/libstdc++-v3/testsuite/23_containers/unordered_set/96088.cc +++ b/libstdc++-v3/testsuite/23_containers/unordered_set/96088.cc @@ -223,7 +223,8 @@ test03() std::vector<std::string> v; v.insert(v.end(), lst.begin(), lst.end()); - auto __offset = __gnu_test::counter::count(); + const auto origin = __gnu_test::counter::count(); + { __gnu_test::counter::reset(); std::unordered_set<std::string, @@ -232,15 +233,19 @@ test03() us.insert(v.begin(), v.end()); VERIFY( us.size() == 1 ); - VERIFY( __gnu_test::counter::count() - __offset == 3 ); - VERIFY( __gnu_test::counter::get()._M_increments == 3 ); + // Allocate array of buckets, a node, and the std::string (unless COW). + constexpr std::size_t increments = _GLIBCXX_USE_CXX11_ABI ? 3 : 2; + + VERIFY( __gnu_test::counter::count() == origin + increments ); + VERIFY( __gnu_test::counter::get()._M_increments == increments ); us.insert(v.begin(), v.end()); VERIFY( us.size() == 1 ); - VERIFY( __gnu_test::counter::count() - __offset == 3 ); - VERIFY( __gnu_test::counter::get()._M_increments == 3 ); + VERIFY( __gnu_test::counter::count() == origin + increments ); + VERIFY( __gnu_test::counter::get()._M_increments == increments ); } + VERIFY( __gnu_test::counter::count() == origin ); { __gnu_test::counter::reset(); @@ -251,8 +256,11 @@ test03() std::make_move_iterator(v.end())); VERIFY( us.size() == 1 ); - VERIFY( __gnu_test::counter::count() - __offset == 2 ); - VERIFY( __gnu_test::counter::get()._M_increments == 2 ); + // Allocate array of buckets and a node. String is moved. + constexpr std::size_t increments = 2; + + VERIFY( __gnu_test::counter::count() == origin + increments ); + VERIFY( __gnu_test::counter::get()._M_increments == increments ); } } diff --git a/libstdc++-v3/testsuite/23_containers/unordered_set/allocator/default_init.cc b/libstdc++-v3/testsuite/23_containers/unordered_set/allocator/default_init.cc index 6ee32d4..1ea6603 100644 --- a/libstdc++-v3/testsuite/23_containers/unordered_set/allocator/default_init.cc +++ b/libstdc++-v3/testsuite/23_containers/unordered_set/allocator/default_init.cc @@ -17,7 +17,6 @@ // { dg-do run { target c++11 } } // { dg-options "-O0" } -// { dg-xfail-run-if "PR c++/65816" { *-*-* } } #include <unordered_set> #include <testsuite_hooks.h> |