On Wed, Sep 14, 2011 at 12:12:36AM +0200, Tobias Burnus wrote: > NULL requires a MOLD argument if the mold cannot be determined from the > context: > > a) print *, null() - was ICEing > b) call foo(null()) - [implicit interface] was accepted but no dummy is > available to get the type > c) call generic(null()) - need to reject it, if it would match several > specific functions > d) null(allocatable) - now allowed (F2003), was rejected before. > > (c) is PR 50375, the rest is PR 34547; see PR for the quote from the > standards. > > Build and regtested on x86-64-linux. > OK for the trunk?
Yes. I was wondering if we need to change the error message in the following code to include procedure pointer? - if (!attr.pointer && !attr.proc_pointer) + if (!attr.pointer && !attr.proc_pointer && !attr.allocatable) { - gfc_error ("'%s' argument of '%s' intrinsic at %L must be a POINTER", - gfc_current_intrinsic_arg[0]->name, + gfc_error ("'%s' argument of '%s' intrinsic at %L must be a POINTER or " + "ALLOCATABLE", gfc_current_intrinsic_arg[0]->name, gfc_current_intrinsic, &mold->where); return FAILURE; } Should this be "... a POINTER, ALLOCATABLE, or PROCEDURE POINTER..."? -- Steve