https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86854
--- Comment #1 from Joshua Oreman <oremanj at mit dot edu> --- To clarify, the -freorder-blocks-and-partition argument in the example invocations is superfluous (that optimization is enabled by default at -O2). With -fno-reorder-blocks-and-partition the issue is not observed even with identical code folding enabled.