4 ! Bug triggered with at least three elements
5 integer, parameter :: asize
= 3
7 double precision,save :: ave(asize
)
8 double precision,save :: old(asize
)
9 double precision,save :: tmp(asize
)
15 call buggy(2.d0
,asize
,ave
,old
,tmp
)
16 if (any (tmp(:) .ne
. 3.5)) call abort
19 subroutine buggy(scale_factor
, asize
, ave
, old
, tmp
)
23 double precision scale_factor
25 double precision ave(asize
)
26 double precision old(asize
)
27 double precision tmp(asize
)
33 tmp(i
) = ave(i
) - old(i
)
35 tmp(i
) = tmp(i
) / scale_factor