[Patch, Fortran] c_f_pointer, c_f_procpointer patch (PR32600)
Jerry DeLisle
jvdelisle@verizon.net
Sun May 25 17:36:00 GMT 2008
Tobias Burnus wrote:
> Hi,
>
> For c_f_pointer(cptr, fptr [, shape]), gfortran currently always calls
> the library. While it makes sense to do so if the Fortran pointer is an
> array, it is not needed for scalar pointers. (In that case shape is not
> present.)
>
> This patch simply changes c_f_pointer(cptr, fptr) into
> fptr = cptr;
>
> Unfortunately, we cannot remove the now obsolete function from the library.
>
> For c_f_procpointer(cfunptr, fprocptr) it also gets rid of the library
> call [which did not work anyhow]. As c_f_procpointer was never callable,
> I could remove it from the library. (The c_f_procpointer part was tested
> with Janus' procpointer patch.)
>
> Build and regression tested on x86-64. OK for the trunk?
>
OK for trunk.
Jerry
More information about the Fortran
mailing list