Paul Richard Thomas wrote:
This one is trivial.  NULL(...) is simply out of context in a transfer
statement.
Bootstrapped and regtested on FC17/x86_64.  OK for trunk and 4.8?

Looks good to me, except that I wonder whether the wording could be improved:
  "Invalid context for NULL () intrinsic at %L",

For instance, something like "NULL() intrinsic not permitted in data-transfer statement" or "Data transfer statement requires an associated pointer" or "NULL() is not an associated pointer as required for an data-transfer statement" or something like that, given that we know that the context is a data transfer statement. The standard requires: "If an output item is a pointer, it shall be associated with a target" (see just added quote to the PR).

Thus, the patch is fine after shortly pondering about the wording; but I am also fine with your wording.

Tobias

2013-11-30  Paul Thomas<pa...@gcc.gnu.org>

     PR fortran/34547
     * resolve.c (resolve_transfer): EXPR_NULL is always in an
     invalid context in a transfer statement.

2013-11-30  Paul Thomas<pa...@gcc.gnu.org>

     PR fortran/34547
     * gfortran.dg/null_5.f90 : Include new error.
     * gfortran.dg/null_6.f90 : Include new error.

Reply via email to