real parameters should not rely on type promotion
While 0.0 and 0.0d0 are the same number in math, they are not the same in Fortran, because one is real(4) and the other is real(8).
Flang (new) and Intel Fortran raise an error when trying to pass a real(4) parameter to a real(8) dummy argument. The following trivial patch addresses this.
You could also add "d0" at the end, but then you'd be relying on truncation. I do not know which is preferred.
diff --git a/src/fmm/fmm.F90 b/src/fmm/fmm.F90
index 7ce2ca9..888daba 100644
--- a/src/fmm/fmm.F90
+++ b/src/fmm/fmm.F90
@@ -1154,7 +1154,7 @@ contains
p_coordinates => coordinates(:,:)
call octree_build(ncrit, expansion_order, theta, p_coordinates, p_multipoles)
ndens = size(local_expansion, 3)
- allocate (tree%local_expansion(tree%num_nodes, settings%multipole_size), source=0.0)
+ allocate (tree%local_expansion(tree%num_nodes, settings%multipole_size), source=real(0,kind=rp))
do k = 1, ndens
tree%local_expansion(:,:) = 0.0_rp
do i = 1, size(box_indices)
diff --git a/src/pelib_cavity_generators.F90 b/src/pelib_cavity_generators.F90
index fca67d1..3b1fca4 100644
--- a/src/pelib_cavity_generators.F90
+++ b/src/pelib_cavity_generators.F90
@@ -55,9 +55,9 @@ subroutine fixtes(all_centers, all_charges)
integer(ip) :: II, I, J, INUC, NFFTS, IFFAT
integer(ip) :: KFFTS, ITS, JJJ
real(rp) :: TH, FI, CTH, STH, FIR
- real(rp), parameter :: GOLD = 1.618033988749895
- real(rp), parameter :: ONEGOLD = 1.0 / GOLD
- real(rp), parameter :: SQRT13 = 0.577350269189626
+ real(rp), parameter :: GOLD = real(1.618033988749895,kind=rp)
+ real(rp), parameter :: ONEGOLD = real(1.0,kind=rp) / GOLD
+ real(rp), parameter :: SQRT13 = real(0.577350269189626,kind=rp)
EQUIVALENCE (IDUM(1),JVT1(1,1))