Hi all, here is another proc-ptr patch, which allows to submit calls to procedure-pointer components which have a procedure-pointer result. This sounds a bit twisted (and I guess one has to suffer from some very special form of mental illness in order to feel the urge to do something like this), but apparently it is allowed by the standard, and by chance I came across it recently.
Fortunately the patch is rather straightforward and just makes some minor adjustments in the corresponding parsing and checking routines. Regtested on x86_64-unknown-linux-gnu. Ok for trunk? Cheers, Janus 2012-09-17 Janus Weil <ja...@gcc.gnu.org> PR fortran/54285 * expr.c (gfc_check_pointer_assign): Correctly handle procedure pointers as function results. * primary.c (gfc_match_varspec): Allow to call a PPC with proc-ptr result. 2012-09-17 Janus Weil <ja...@gcc.gnu.org> PR fortran/54285 * gfortran.dg/proc_ptr_result_7.f90: New.
pr54285.diff
Description: Binary data
proc_ptr_result_7.f90
Description: Binary data