This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [Patch, Fortran] c_f_pointer, c_f_procpointer patch (PR32600)


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]