[Patch, fortran] PR34547 - [4.8/4.9 regression] NULL(): Fortran 2003 changes, accepts invalid, ICE on invalid

Tobias Burnus burnus@net-b.de
Sun Dec 1 10:58:00 GMT 2013


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<pault@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<pault@gcc.gnu.org>
>
>      PR fortran/34547
>      * gfortran.dg/null_5.f90 : Include new error.
>      * gfortran.dg/null_6.f90 : Include new error.



More information about the Fortran mailing list