https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85961
Alexander Monakov <amonakov at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |amonakov at gcc dot gnu.org --- Comment #3 from Alexander Monakov <amonakov at gcc dot gnu.org> --- You'd need to disable IPA-RA after forcing -O2 with the pragma, i.e.: #pragma GCC optimize "O2" #pragma GCC optimize "no-ipa-ra" We already have logic to disable IPA-RA when instrumentation/profiling is active, but it's done once in toplev.c. Here the pragma re-enables IPA-RA after toplev.c:process_options() has disabled it. Do we want to adjust it given that "pragma optimized" is documented as "not suitable for production use"?