This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PRs 34547/50375] Fixes to NULL with MOLD= check
- From: Steve Kargl <sgk at troutmask dot apl dot washington dot edu>
- To: Tobias Burnus <burnus at net-b dot de>
- Cc: gcc patches <gcc-patches at gcc dot gnu dot org>, gfortran <fortran at gcc dot gnu dot org>
- Date: Tue, 13 Sep 2011 15:31:30 -0700
- Subject: Re: [PRs 34547/50375] Fixes to NULL with MOLD= check
- References: <4E6FD554.5040206@net-b.de>
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