https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93222
--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> --- >(** it's strange that extracting all -O optimization params to command line >according to manual won't trigger the strange behaviour, maybe I got the >options wrong) No you did not read the manual correctly about -O though: Most optimizations are completely disabled at -O0 or if an -O level is not set on the command line, even if individual optimization flags are specified. Similarly, -Og suppresses many optimization passes.