------- Comment #5 from rguenth at gcc dot gnu dot org 2010-08-27 12:06 ------- MODULE hfx_contract_block INTEGER, PARAMETER :: dp=KIND(0.0D0) CONTAINS SUBROUTINE block_9_2(mc_max,md_max,kbd,kbc,kad,kac,pbd,pbc,pad,pac,prim,scale) INTEGER :: mc_max, md_max REAL(KIND=dp) :: kbd(2*md_max), kbc(2*mc_max), kad(9*md_max), & kac(9*mc_max), pbd(2*md_max), pbc(2*mc_max), pad(9*md_max), & pac(9*mc_max), prim(9*2*mc_max*md_max), scale
INTEGER :: ma, mb, mc, md, p_index REAL(KIND=dp) :: ks_bc, ks_bd, p_bc, p_bd, tmp kbd(1:2*md_max) = 0.0_dp kbc(1:2*mc_max) = 0.0_dp kad(1:9*md_max) = 0.0_dp kac(1:9*mc_max) = 0.0_dp p_index = 0 DO md = 1,md_max DO mc = 1,mc_max DO mb = 1,2 ks_bd = 0.0_dp ks_bc = 0.0_dp p_bd = pbd((md-1)*2+mb) p_bc = pbc((mc-1)*2+mb) DO ma = 1,9 p_index=p_index+1 tmp = scale*prim(p_index) ks_bc = ks_bc + tmp* pad((md-1)*9+ma) ks_bd = ks_bd + tmp* pac((mc-1)*9+ma) kad((md-1)*9+ma) = kad((md-1)*9+ma)-tmp*p_bc kac((mc-1)*9+ma) = kac((mc-1)*9+ma)-tmp*p_bd END DO kbd((md-1)*2+mb) = kbd((md-1)*2+mb) - ks_bd kbc((mc-1)*2+mb) = kbc((mc-1)*2+mb) - ks_bc END DO END DO END DO END SUBROUTINE block_9_2 END MODULE gfortran -S -O3 -ffree-form -fbounds-check t.f90 -ftime-report tree iv optimization : 3.49 (94%) usr 0.00 ( 0%) sys 3.52 (94%) wall 2272 kB (36%) ggc can someone try to track down revisions that slowed that testcase down? -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45422