https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114123
--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> --- I think GCC's behavior here is correct, see PR 83264 . Specifically https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83264#c11 . And https://cplusplus.github.io/CWG/issues/1467.html .