Hello,
I'm attempting to use xmpf90 to compile the following code:
module constants_mod
use, intrinsic :: iso_fortran_env, only : real32, real64, int32
implicit none
integer, parameter :: r_def = real64
real(kind=r_def), parameter :: EPS = 3.0e-15_r_def
end module
but the compiler gives:
[code_fragments]$ xmpf90 -c minimal_constants_mod.f90
"minimal_constants_mod.f90:constants_mod", line 9: bad expression in constant kind parameter
"minimal_constants_mod.f90:constants_mod", line 9: bad expression in constant kind parameter
If I change the definition of "r_def" from "real64" to e.g. KIND(1.0d0) then the compiler is happy.
Is this a known bug or something I'm doing wrong?
Many thanks,
Andy.