3 ! { dg-options "-Wreturn-type" }
4 ! { dg-final { cleanup-modules "kahan_sum" } }
7 INTEGER, PARAMETER :: dp
=KIND(0.0D0
)
9 MODULE PROCEDURE kahan_sum_d1
, kahan_sum_z1
10 END INTERFACE accurate_sum
12 REAL (KIND
=dp
), DIMENSION ( : ), POINTER :: gsq
15 REAL (KIND
=dp
), DIMENSION ( : ), POINTER :: cr
16 COMPLEX (KIND
=dp
), DIMENSION ( : ), POINTER :: cc
17 TYPE ( pw_grid_type
), POINTER :: pw_grid
20 FUNCTION kahan_sum_d1(array
,mask
) RESULT(ks
) ! { dg-warning "not set" }
21 REAL(KIND
=dp
), DIMENSION(:), INTENT(IN
) :: array
22 LOGICAL, DIMENSION(:), INTENT(IN
), &
25 END FUNCTION kahan_sum_d1
26 FUNCTION kahan_sum_z1(array
,mask
) RESULT(ks
) ! { dg-warning "not set" }
27 COMPLEX(KIND
=dp
), DIMENSION(:), &
29 LOGICAL, DIMENSION(:), INTENT(IN
), &
31 COMPLEX(KIND
=dp
) :: ks
32 END FUNCTION kahan_sum_z1
34 FUNCTION pw_integral_a2b ( pw1
, pw2
) RESULT ( integral_value
)
35 TYPE(pw_type
), INTENT(IN
) :: pw1
, pw2
36 REAL(KIND
=dp
) :: integral_value
37 integral_value
= accurate_sum ( REAL ( CONJG ( pw1
% cc ( : ) ) &
38 * pw2
% cc ( : ) ,KIND
=dp
) * pw1
% pw_grid
% gsq ( : ) )
39 END FUNCTION pw_integral_a2b