2 ! { dg-options "-O2 -fdump-tree-fre1 -fdump-tree-pre-details" }
4 subroutine eval(foo1
,foo2
,foo3
,foo4
,x
,n
,nnd
)
5 implicit real*8 (a
-h
,o
-z
)
6 dimension foo3(n
),foo4(n
),x(nnd
)
15 temp
=temp
+(x(k
)-x(k
+jmini
))**2
17 temp
= sqrt(temp
+foo1
)
18 foo3(i
)=foo3(i
)+temp
*foo4(j
)
19 foo3(j
)=foo3(j
)+temp
*foo4(i
)
24 ! We should have hoisted the division
25 ! { dg-final { scan-tree-dump "in all uses of countm1\[^\n\]* / " "pre" } }
26 ! There should be only one load from n left
27 ! { dg-final { scan-tree-dump-times "\\*n_" 1 "fre1" } }