As Fortran 2018 18.2.3.6, the intrinsic c_loc(x) gets the C address
of argument x. It returns the scalar of type C_PTR. As defined in
iso_c_binding in flang/module/__fortran_builtins.f90, C_PTR is the
derived type with only one component of integer 64.
This supports the lowering of intrinsic module procedure c_loc by
converting the address of argument into integer 64, where the argument
is lowered as Box and the address is generated using fir.box_addr.
The lowering of intrinsic c_funloc has the similar characteristic and
will be supported later.
The execution tests for various data types are in issue
https://github.com/llvm/llvm-project/issues/56552.
prepareActualToBaseAddressLike is inserting copy-in when the arguments are not simply contiguous when passing to explicit shape arguments, we do not need/want that here: we should pass the base address and not deal with the case where the argument is not contiguous (the standard says it must be contiguous, although that is something that could only be checked at compile time, and I have a feeling some programmers out there might rely on getting the base first element address, whether the argument is contiguous or not).