https://gcc.gnu.org/bugzilla/show_bug.cgi?id=125378
--- Comment #3 from k-arrows <s.kimura.h41104 at gmail dot com> --- I missed the -std=c++20 flag when testing. With C++20 enabled, the code is valid and the issue is a crash on valid. Thanks for pointing that out.
