http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54717
--- Comment #8 from Dominique d'Humieres <dominiq at lps dot ens.fr> 2012-10-02 20:23:42 UTC --- Created attachment 28333 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=28333 bzipped tar archive of a reduced test The tar archive contains the files cptrf2_inl_1.f90 rnflow.in rnflow_red.f90 rnfprm.h and can be used as in [macbook] dbg_rnflow/pr54717% gfc -c -Ofast -funroll-loops rnflow_red.f90 [macbook] dbg_rnflow/pr54717% gfc -c -O2 cptrf2_inl_1.f90 [macbook] dbg_rnflow/pr54717% gfc rnflow_red.o cptrf2_inl_1.o [macbook] dbg_rnflow/pr54717% time a.out > /dev/null 21.036u 0.051s 0:21.09 99.9% 0+0k 0+0io 0pf+0w [macbook] dbg_rnflow/pr54717% gfc -c -O2 -ftree-loop-if-convert cptrf2_inl_1.f90 [macbook] dbg_rnflow/pr54717% gfc rnflow_red.o cptrf2_inl_1.o [macbook] dbg_rnflow/pr54717% time a.out > /dev/null 27.150u 0.051s 0:27.20 100.0% 0+0k 0+0io 0pf+0w This shows that the file cptrf2_inl_1.f90 compiled with -ftree-loop-if-convert gives a slow executable without involving inlining or vectorization.