https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98432
--- Comment #6 from Iain Sandoe <iains at gcc dot gnu.org> --- (In reply to Tomáš Hering from comment #5) > Created attachment 50278 [details] > unprocessed original source > > Oops, seems I uploaded a slightly different code. I apologize. It's strange > you can't reproduce the issue, though. Please see the demo with the original > code on godbolt (https://godbolt.org/z/Gao919) which is in accordance with > my local output. Please note that the behavior now seems correct when > setting the trunk version of gcc there. Perhaps it has been fixed in some > recent commit. >From my tests, it is fixed on 10.x and master - (In reply to Tomáš Hering from comment #5) > Created attachment 50278 [details] > unprocessed original source > > Oops, seems I uploaded a slightly different code. I apologize. It's strange > you can't reproduce the issue, though. Please see the demo with the original > code on godbolt (https://godbolt.org/z/Gao919) which is in accordance with > my local output. Please note that the behavior now seems correct when > setting the trunk version of gcc there. Perhaps it has been fixed in some > recent commit. So, even with the original code copied from Compiler Explorer, from my tests, this is fixed on 10.x and master, therefore I think we can close it here (unless you want to make a build of the 10.x branch on your platform to double-check).