<div dir="ltr">I have created a separate bugzilla for it: <a href="https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120994">https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120994</a></div><br><div class="gmail_quote gmail_quote_container"><div dir="ltr" class="gmail_attr">On Tue, Jul 8, 2025 at 9:58 AM Luc Grosheintz <<a href="mailto:luc.grosheintz@gmail.com">luc.grosheintz@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">How would you like to track this on bugzilla:<br>
<br>
1. As part of submdspan:<br>
<a href="https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110352" rel="noreferrer" target="_blank">https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110352</a><br>
<a href="https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2023/p2630r4.html" rel="noreferrer" target="_blank">https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2023/p2630r4.html</a><br>
<br>
2. As a new issue, because it's a different paper:<br>
<a href="https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2024/p2897r7.html" rel="noreferrer" target="_blank">https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2024/p2897r7.html</a><br>
<br>
On 7/3/25 12:33, Luc Grosheintz wrote:<br>
> This patch series implements the aligned_accessor paper P2897R7 in three<br>
> parts:<br>
> <br>
> - Implement `is_sufficiently_aligned` which is part of <memory>.<br>
> - Prepare the accessor tests for reuse.<br>
> - Implement aligned_accessor.<br>
> <br>
> A couple of remarks:<br>
> <br>
> - The paper P2897R7 and spec N5008 don't specify that the aligment<br>
> for is_sufficiently_aligned must be a power of two.<br>
> <br>
> - The reasoning for why is_sufficiently_aligned isn't constexpr is<br>
> nicely described in the paper.<br>
> <br>
> - Use of `class` in is_sufficiently_aligned is for consistency within<br>
> that file.<br>
> <br>
> - The tests create new unsupported tests and expected failures. The<br>
> testsuite doesn't have all that many of those; so there's likely a<br>
> strategy to avoid this. However, I don't know how.<br>
> <br>
> - These changes are independent of mdspan, but due to the precise<br>
> location of the code it might conflict with the mdspan patch series.<br>
> <br>
> - I skipped updating `cxxapi-data.csv` for is_sufficiently_aligned<br>
> due to consistency with the rest of the mdspan patches, i.e. there<br>
> will be a bulk update of the file later.<br>
> <br>
> - Each commit was tested with/without PCH and with/without<br>
> _GLIBCXX_DEBUG filtered by 20_util/is_sufficiently_aligned<br>
> and 23_containers/mdspan.<br>
> The last commit was tested fully with/without PCH. All tests on<br>
> x86_64-linux.<br>
> <br>
> As always I'm happy to reorganize into different commits, if the<br>
> grouping doesn't make sense.<br>
> <br>
> Luc Grosheintz (3):<br>
> libstdc++: Implement is_sufficiently_aligned.<br>
> libstdc++: Prepare test code for default_accessor for reuse.<br>
> libstdc++: Implement aligned_accessor from mdspan.<br>
> <br>
> libstdc++-v3/include/bits/align.h | 16 ++<br>
> libstdc++-v3/include/bits/version.def | 18 ++<br>
> libstdc++-v3/include/bits/version.h | 20 +++<br>
> libstdc++-v3/include/std/mdspan | 72 ++++++++<br>
> libstdc++-v3/include/std/memory | 1 +<br>
> libstdc++-v3/src/c++23/<a href="http://std.cc.in" rel="noreferrer" target="_blank">std.cc.in</a> | 4 +-<br>
> .../20_util/is_sufficiently_aligned/1.cc | 31 ++++<br>
> .../20_util/is_sufficiently_aligned/2.cc | 7 +<br>
> .../23_containers/mdspan/accessors/aligned.cc | 43 +++++<br>
> .../mdspan/accessors/aligned_ftm.cc | 6 +<br>
> .../mdspan/accessors/aligned_neg.cc | 33 ++++<br>
> .../accessors/debug/aligned_access_neg.cc | 23 +++<br>
> .../accessors/debug/aligned_offset_neg.cc | 23 +++<br>
> .../23_containers/mdspan/accessors/default.cc | 99 -----------<br>
> .../23_containers/mdspan/accessors/generic.cc | 168 ++++++++++++++++++<br>
> 15 files changed, 464 insertions(+), 100 deletions(-)<br>
> create mode 100644 libstdc++-v3/testsuite/20_util/is_sufficiently_aligned/1.cc<br>
> create mode 100644 libstdc++-v3/testsuite/20_util/is_sufficiently_aligned/2.cc<br>
> create mode 100644 libstdc++-v3/testsuite/23_containers/mdspan/accessors/aligned.cc<br>
> create mode 100644 libstdc++-v3/testsuite/23_containers/mdspan/accessors/aligned_ftm.cc<br>
> create mode 100644 libstdc++-v3/testsuite/23_containers/mdspan/accessors/aligned_neg.cc<br>
> create mode 100644 libstdc++-v3/testsuite/23_containers/mdspan/accessors/debug/aligned_access_neg.cc<br>
> create mode 100644 libstdc++-v3/testsuite/23_containers/mdspan/accessors/debug/aligned_offset_neg.cc<br>
> delete mode 100644 libstdc++-v3/testsuite/23_containers/mdspan/accessors/default.cc<br>
> create mode 100644 libstdc++-v3/testsuite/23_containers/mdspan/accessors/generic.cc<br>
> <br>
<br>
</blockquote></div>