This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [Patch, Fortran] PR 39735: procedure pointer assignments: return value is not checked
- From: Tobias Burnus <burnus at net-b dot de>
- To: gcc-patches at gcc dot gnu dot org, fortran at gcc dot gnu dot org
- Cc: Janus Weil <janus at gcc dot gnu dot org>
- Date: Fri, 17 Apr 2009 08:51:23 +0200
- Subject: 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