[Bug libstdc++/118395] Constructor of std::barrier is not constexpr

2025-04-02 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118395 Jonathan Wakely changed: What|Removed |Added Assignee|unassigned at gcc dot gnu.org |redi at gcc dot gnu.org Last

[Bug libstdc++/118395] Constructor of std::barrier is not constexpr

2025-02-20 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118395 Jonathan Wakely changed: What|Removed |Added Target Milestone|--- |16.0

[Bug libstdc++/118395] Constructor of std::barrier is not constexpr

2025-01-10 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118395 --- Comment #4 from Jonathan Wakely --- Patch posted: https://gcc.gnu.org/pipermail/gcc-patches/2025-January/673200.html

[Bug libstdc++/118395] Constructor of std::barrier is not constexpr

2025-01-10 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118395 --- Comment #3 from Jonathan Wakely --- So all we need to do is add a single point of contention that all threads synchronize on every time they call arrive, to make our contention-avoiding tree barrier work.

[Bug libstdc++/118395] Constructor of std::barrier is not constexpr

2025-01-10 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118395 --- Comment #2 from Jonathan Wakely --- Making this constexpr requires major changes: size_t const __count = (_M_expected + 1) >> 1; _M_state = std::make_unique<__state_t[]>(__count); We can't allocate an array during constan

[Bug libstdc++/118395] Constructor of std::barrier is not constexpr

2025-01-10 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118395 --- Comment #1 from Jonathan Wakely --- We also have: static constexpr ptrdiff_t max() noexcept { return __PTRDIFF_MAX__; } But this seems wrong, because the constructor does: size_t const __count = (_M_expected + 1