https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103465
--- Comment #10 from Tomas Kalibera <tomas.kalibera at gmail dot com> --- (In reply to Tomas Kalibera from comment #7) > (In reply to Martin Liška from comment #5) > > > However, still talking about the current master only, I see a difference > > > with -O3, when I try on the repro example from Bug 103274 and -O3: > > > > > > x86_64-w64-mingw32-gcc -c -S -O3 -fno-reorder-blocks-and-partition a.c -o > > > nropt.s > > > > > > x86_64-w64-mingw32-gcc -c -S -O3 -freorder-blocks-and-partition a.c -o > > > ropt.s > > > x86_64-w64-mingw32-gcc -c -S -O3 a.c -o noopt.s > > > > > > All of these assembler files are different (and from my non-expert > > > reading, > > > noopt.s uses the optimization and does have the invalid unwind information > > > as reported in Bug 103274). Is the optimization correctly dropped also > > > with > > > -O3 only? > > > > Hmmm, I've just tested the same with the locally built cross-compiler: > > ~/Programming/gcc/configure --enable-languages=c,c++ > > --prefix=/home/marxin/bin/gcc --disable-multilib --enable-host-shared > > --disable-libsanitizer --enable-valgrind-annotations --disable-bootstrap > > --target=x86_64-w64-mingw32 > > > > and it works fine, all 3 assembly files are identical. > It tried on the current GCC trunk as now (747380f47da0da6c11fd5262ac428bb53433ea19). ropt.s is still the same as noopt.s. The unwinding information is correct now, because Bug 103274 has been fixed in the meantime. However, indeed, the reordering optimization is applied. nropt.s has correct unwinding information without the reordering. So, still, the reorder-stacks-and-partition optimization is not dropped by target (though I am not claiming they should be dropped, I don't know, that's only what I learned from your response to my original report). For these results I've only changed the git version in the dockerfile.