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] PR 39735: procedure pointer assignments: return value is not checked


Hi Janus,

> here is my patch for PR 39735, which has become a bit larger than
> expected. Its primary purpose is to add a check for procedure pointer
> assignments, which makes sure that the assigned procedure has the
> right return type. Other checks have already been added with PR 38290
> (cf. proc_ptr_11.f90).

Can you rename
  copy_formal_args
to
  gfc_copy_formal_args
as it is not static/restricted to one file.

Additionally, I have the feeling that gfortran will leak memory if
resolve_intrinsic is called multiple times for the same proc pointer
due to gfc_copy_formal_args not freeing the memory, but I might have
overlooked something.

Otherwise, the patch looks ok. I will re-read and review it at the
weekend.

Tobias


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