https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88798
--- Comment #3 from Wojciech Mula <wojciech_mula at poczta dot onet.pl> --- Sorry, I didn't find that bug; I think you may close this one. BTW, I had checked the code on godbolt.org before submitting. I tested also with their "GCC (trunk)", but the generated code is the same as for 8.2. The trunk's version is "g++ (GCC-Explorer-Build) 9.0.0 20190109 (experimental)" -- seems it's a fresh version and should already include the fixes Andrew mentioned.