https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116752
--- Comment #2 from Jonathan Wakely <redi at gcc dot gnu.org> --- (In reply to Andrew Pinski from comment #1) > Dup. > > *** This bug has been marked as a duplicate of bug 35557 *** I think this specific case is a dup of PR 99995, since it only affects C++20 mode. Changing it to a C++17 program gives the expected result: https://godbolt.org/z/7fr6aM41f *** This bug has been marked as a duplicate of bug 99995 ***