1! { dg-do compile } 2! { dg-options "-O2 -ffast-math -fdump-tree-pre" } 3 4 subroutine foo(U,V,R,N,A) 5 integer N 6 real*8 U(N,N,N),V(N,N,N),R(N,N,N),A(0:3) 7 integer I3, I2, I1 8C 9 do I3=2,N-1 10 do I2=2,N-1 11 do I1=2,N-1 12 R(I1,I2,I3)=V(I1,I2,I3) 13 * -A(0)*( U(I1, I2, I3 ) ) 14 * -A(1)*( U(I1-1,I2, I3 ) + U(I1+1,I2, I3 ) 15 * + U(I1, I2-1,I3 ) + U(I1, I2+1,I3 ) 16 * + U(I1, I2, I3-1) + U(I1, I2, I3+1) ) 17 * -A(2)*( U(I1-1,I2-1,I3 ) + U(I1+1,I2-1,I3 ) 18 * + U(I1-1,I2+1,I3 ) + U(I1+1,I2+1,I3 ) 19 * + U(I1, I2-1,I3-1) + U(I1, I2+1,I3-1) 20 * + U(I1, I2-1,I3+1) + U(I1, I2+1,I3+1) 21 * + U(I1-1,I2, I3-1) + U(I1-1,I2, I3+1) 22 * + U(I1+1,I2, I3-1) + U(I1+1,I2, I3+1) ) 23 * -A(3)*( U(I1-1,I2-1,I3-1) + U(I1+1,I2-1,I3-1) 24 * + U(I1-1,I2+1,I3-1) + U(I1+1,I2+1,I3-1) 25 * + U(I1-1,I2-1,I3+1) + U(I1+1,I2-1,I3+1) 26 * + U(I1-1,I2+1,I3+1) + U(I1+1,I2+1,I3+1) ) 27 enddo 28 enddo 29 enddo 30 return 31 end 32 33! PRE shouldn't do predictive commonings job here (and in a bad way) 34! ??? It still does but not as bad as it could. Less prephitmps 35! would be better, pcom does it with 6. 36! { dg-final { scan-tree-dump-times "# prephitmp" 9 "pre" } } 37