Execute f32() if platform is 32-bit, or f64() if platform is 64-bit. This can be either a compile-time condition (depending on target) or a runtime detection.
program main
use iso_c_binding
implicit none
type(c_ptr) :: x
logical, parameter :: is_64 = c_sizeof(x) == 8
if (is_64) then
call f64
else
call f32
end if
end program main
program main
use iso_c_binding
implicit none
type(c_ptr) :: x
logical, parameter :: is_64 = c_sizeof(x) == 8
if (is_64) then
call f64
else
call f32
end if
end program main