http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46590
--- Comment #42 from Richard Biener <rguenth at gcc dot gnu.org> --- Another interesting bit - -O0 takes 17s (and also ~1GB memory) but -Og is not much faster than -O1 (116s). > ./f951 -quiet -Og t2.f90 -ftime-report Execution times (seconds) df reaching defs : 62.51 (54%) usr 104.47 (85%) sys 167.73 (70%) wall 0 kB ( 0%) ggc bah. I didn't constrain RTL optimizers with -Og (seems to be RTL loop invariant motion here - after all at -Og no gimple loop opts run and it _can_ move quite some invariants). Disabling loop2 for -Og improves this to 50s Execution times (seconds) alias stmt walking : 10.11 (20%) usr 0.10 (14%) sys 10.29 (20%) wall 338 kB ( 0%) ggc parser (global) : 2.34 ( 5%) usr 0.06 ( 8%) sys 2.39 ( 5%) wall 70763 kB (11%) ggc tree PTA : 6.12 (12%) usr 0.04 ( 6%) sys 6.16 (12%) wall 2735 kB ( 0%) ggc loop init : 5.78 (11%) usr 0.01 ( 1%) sys 5.78 (11%) wall 24078 kB ( 4%) ggc integrated RA : 2.68 ( 5%) usr 0.04 ( 6%) sys 2.73 ( 5%) wall 64596 kB (10%) ggc TOTAL : 50.76 0.71 51.71 646243 kB I'll push a patch to do that (the above shows PTA which also can be disabled, and alias stmt walking could be limited some more).