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
import "strconv"
if strconv.IntSize==32 {
f32()
}
if strconv.IntSize==64 {
f64()
}
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