[Bug libstdc++/111050] [11/12/13/14 Regression] ABI break in _Hash_node_value_base since GCC 11
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111050 --- Comment #9 from frs.dumont at gmail dot com --- To be honest before that report I thought that preserving abi was just a matter of preserving memory layout of types. I had no idea that member methods mattered ! Lesson learned. On 11/09/2023 13:52, redi at gcc dot gnu.org wrote: > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111050 > > --- Comment #8 from Jonathan Wakely --- > (In reply to François Dumont from comment #1) >> It seems to be a limited issue as you need a non-optimized build. > That's not a safe assumption. Inlining decisions can change across builds and > across architectures, and it's not safe to assume the affected functions will > always be inlined, e.g. in the presence of explicit instantiation definitions. > >> The only >> impacted member is the _M_next() which is a simple static_cast, I'm very >> surprised that it's not always inlined even if non-optimized. > No functions are inlined for non-optimized builds, unless forced with > always_inline. >
[Bug libstdc++/90276] PSTL tests fail in Debug Mode
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90276 --- Comment #9 from frs.dumont at gmail dot com --- Here is the reason of the 20_util/specialized_algorithms/pstl/uninitialized_copy_move.cc FAIL. Maybe it fixes some other tests too, I need to run all of them. libstdc++: Do not forward arguments several times [PR90276] Forwarding several times the same arguments results in UB. It is detected by the _GLIBCXX_DEBUG mode as an attempt to use a singular iterator which has been moved. libstdc++-v3/ChangeLog PR libstdc++/90276 * testsuite/util/pstl/test_utils.h: Remove std::forward<> calls when done several times on the same arguments. Ok to commit ? François On 31/01/2024 14:11, redi at gcc dot gnu.org wrote: > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90276 > > Jonathan Wakely changed: > > What|Removed |Added > > See Also||https://github.com/llvm/llv > ||m-project/issues/80136 >
[Bug libstdc++/115285] [12/13/14 Regression] std::unordered_set can have duplicate value
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115285 --- Comment #15 from frs.dumont at gmail dot com --- On 05/11/2024 18:18, redi at gcc dot gnu.org wrote: > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115285 > > --- Comment #14 from Jonathan Wakely --- > We're assuming that an iterator's reference type can be converted to the > key_type. This doesn't compile on trunk: > > #include > > struct K { >explicit K(int) noexcept { } >bool operator==(const K&) const { return true; } > }; > > template<> struct std::hash { >auto operator()(const K&) const { return 0ul; } > }; > > int i[1]; > std::unordered_set s(i, i+1); > > > This fails for similar reasons: > > #include > > struct K { >explicit K(int) noexcept { } >bool operator==(const K&) const { return true; } > }; It's surprising that we need to handle this use case. The user wants K is to be explicitly built from int but then insert ints, weird. Are other Standard library handling this ? You know C++ Standard much better than I do though.