Hi Paul, > I am somewhat startled that this was so "easy" to fix (ie. the patch looks > easy but I'll bet that find the fix was not!).
well, actually finding it was not so hard: The backtrace in the PR pointed me directly to mio_expr, and a bit of debugging showed that we simply do do handle any refs for function calls. > OK for trunk. Thanks, committed as r205983. > I think that MOD_VERSION does need bumping but I would bow to > good negative arguments from others. I agree. One point is that the MOD_VERSION on trunk (11) is already different from the value on 4.8 (10), i.e. it has already been bumped in this release cycle. Moreover the changes I made are "backward-compatible" in the sense that trunk can still read old module files, and also old gfortran versions should still be able to handle modules written by trunk (as long as they don't contain TBP references - however this is anyway prevented by the already-bumped MOD_VERSION). Cheers, Janus > On 11 December 2013 22:57, Janus Weil <ja...@gcc.gnu.org> wrote: >> >> Hi all, >> >> the PR in the subject line involves a module procedure whose result >> has array bounds which contain a type-bound procedure call. Since the >> procedure interface is written to the .mod file, also the TBP >> expression needs to be written. This leads to an ICE, since it simply >> has not been implemented yet. >> >> When writing a function reference, we now discriminate between three >> cases: (1) 'ordinary' procedures, (2) type-bound procedures and (3) >> intrinsic procedures. We first read/write an integer value to indicate >> which case we're dealing with, and then do the specific I/O for this >> case (see patch). Up to now we basically did the same already, but >> only including two cases (ordinary and intrinsic functions). >> >> The patch has been regtested on x86_64-unknown-linux-gnu. Ok for trunk? >> >> Should I also bump the MOD_VERSION? >> >> Cheers, >> Janus >> >> >> >> 2013-12-11 Janus Weil <ja...@gcc.gnu.org> >> >> PR fortran/59450 >> * module.c (mio_expr): Handle type-bound function expressions. >> >> >> 2013-12-11 Janus Weil <ja...@gcc.gnu.org> >> >> PR fortran/59450 >> * gfortran.dg/typebound_proc_31.f90: New. > > > > > -- > The knack of flying is learning how to throw yourself at the ground and > miss. > --Hitchhikers Guide to the Galaxy