Hi
When using the -std flag to Digital Fortran (Unix) compiler I get some
warnings which I don't understand. They are illustrated by this
example ...
% f90 -std possiblebug.f90
f90: Warning: possiblebug.f90, line 14: Fortran 90 specifies that an elemental intrinsic function here be of type integer or character and each argument must be an initialization expr of type integer or character (R537.4). [REAL]
call daft ( (/ ( real (1.0,kind=rk) , i=1,10 ) /) )
-------------------^
% cat possiblebug.f90
module mymod
public :: daft
integer , parameter , public :: rk = selected_real_kind (P=6)
contains
subroutine daft (arr)
real (kind=rk) , dimension(:) , intent(in) :: arr
print *, sum ( arr )
return
end subroutine daft
end module mymod
program prog
use mymod
integer :: i
call daft ( (/ ( real (1.0,kind=rk) , i=1,10 ) /) )
call daft ( (/ ( 1.0_rk , i=1,10 ) /) )
end program prog
Is this just a bug, or have I missed something?
Kev
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|