https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99527
--- Comment #2 from janekb04 at icloud dot com <janekb04 at icloud dot com> --- Indeed, it seems to have been fixed. I'm not sure if this issue should be closed though. Until the fix comes out in a stable release, there is still the possibility that a regression will occur and this issue will reoccur. The issue does occur under g++ 11.2: https://godbolt.org/z/z87ah6ehd .