llvm-project
llvm-project copied to clipboard
[flang] Missing diagnostic of the shape argument in c_f_pointer intrinsic
Diagnostic of the shape argument is missing.
use, intrinsic :: iso_c_binding
integer :: csize
integer, pointer :: iptr(:,:)
type(c_ptr) :: cptr
call c_f_pointer(cptr, iptr, shape=(/csize/))
end
flang-new compiles successfully
gfortran issues the following message:
Error: SHAPE argument at (1) to C_F_POINTER must have the same size as the RANK of FPTR
@llvm/issue-subscribers-flang-frontend