https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108223 --- Comment #3 from Nikolas Klauser <nikolasklauser at berlin dot de> --- It doesn't have to work, but it works for some inputs, so I would expect that it works for all. https://godbolt.org/z/KsrjEP77c