[Patch, Fortran, 4.5] PR38290: procedure pointer assignment checking
Janus Weil
janus@gcc.gnu.org
Fri Jan 16 15:41:00 GMT 2009
... ping! ...
2008/12/11 Janus Weil <janus@gcc.gnu.org>:
> Hi all,
>
> here comes my patch for PR38290. This fixes a couple of issues related
> to PROCEDURE statements with intrinsic interfaces:
>
> PROCEDURE(sin) :: p
>
> For these the interface of the intrinsic is now correctly transferred
> to the procedure symbol (the formal args were not copied at all, and
> the typespec was copied too late).
>
> In addition the interface check for procptr assignments has been
> re-enabled. This check is done via gfc_compare_interfaces, which was
> modified to also handle intrinsics.
>
> Regtested on i686-pc-linux-gnu. Ok for 4.5?
>
> Cheers,
> Janus
>
>
> 2008-12-11 Janus Weil <janus@gcc.gnu.org>
>
> PR fortran/38920
> * expr.c (gfc_check_pointer_assign): Enable interface check for
> procedure pointers.
> * gfortran.h: Add copy_formal_args_intr.
> * interface.c (gfc_compare_interfaces): Call gfc_compare_intr_interfaces
> if second argument is an intrinsic.
> (compare_intr_interfaces): Correctly set attr.function, attr.subroutine
> and ts.
> (compare_parameter): Call gfc_compare_interfaces also for intrinsics.
> * resolve.c (resolve_specific_f0,resolve_specific_s0): Don't resolve
> intrinsic interfaces here. Must happen earlier.
> (resolve_symbol): Resolution of intrinsic interfaces moved here from
> resolve_specific_..., and formal args are now copied from intrinsic
> interfaces.
> * symbol.c (copy_formal_args_intr): New function to copy the formal
> arguments from an intinsic procedure.
>
>
> 2008-12-11 Janus Weil <janus@gcc.gnu.org>
>
> PR fortran/38920
> * gfortran.dg/proc_decl_1.f90: Modified.
> * gfortran.dg/proc_ptr_11.f90: Extended.
>
More information about the Fortran
mailing list