Undefined association status after c_f_pointer(c_null_ptr) in iso_c_binding
The goal is to convert a C pointer received through iso_c_binding into a Fortran pointer with c_f_pointer, then test association before dereferencing. The code must compile under Fortran 2003 through Fortran 2018 and remain repeatable when the compiler is changed. The standard does not require a diagnostic when c_f_pointer receives c_null_ptr or an address t