Skip to content

Commit 4daf7da

Browse files
committed
avoiding floating invalid operation occurred
test_mean_f03.f90 cause floating invalid operation error because some variable is not initialized.
1 parent 1822e3f commit 4daf7da

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/tests/stats/test_mean_f03.f90

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ program test_mean
2020
call check( sum( abs( mean(d,2) - sum(d,2)/real(size(d,2), dp) )) < dptol)
2121

2222
!dp rank 8
23-
allocate(d8(size(d,1), size(d,2), 3, 4, 5, 6, 7, 8))
23+
allocate(d8(size(d,1), size(d,2), 3, 4, 5, 6, 7, 8),source=0.0_dp)
2424
d8(:, :, 1, 4, 5 ,6 ,7 ,8)=d;
2525
d8(:, :, 2, 4, 5 ,6 ,7 ,8)=d * 1.5_dp;
2626
d8(:, :, 3, 4, 5 ,6 ,7 ,8)=d * 4._dp;

0 commit comments

Comments
 (0)