https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117475
--- Comment #11 from Andrew Pinski <pinskia at gcc dot gnu.org> --- Note again the only reason clang 17 from opensuse works is because it is using GCC's libstdc++ from GCC 7 which is pre the fix for PR 58605 (which was done in GCC 10). And GCC 9.5.0 accepted the original testcase in comment #0 (with -std=c++2a) but that is because std::atomic didn't have the change for PR 58605 .