[Patch, Fortran] PR55763 - reject MOLD with NULL() in init-data expressions
Tobias Burnus
burnus@net-b.de
Thu Jan 3 23:23:00 GMT 2013
NULL with MOLD should be rejected as (default) initialization
expression. From F2008:
R506 null-init is function-reference
C512 (R506) The function-reference shall be a reference to the intrinsic
function NULL with no arguments.
"null-init" occurs twice, as "R505 initialization" in "R505
initialization" and in "R442 component-initialization" (default
initialization).
Before,
integer, pointer :: p => null(x)
gave an type error (LHS: integer, RHS: unknown). While
class(*), pointer :: p => null(x)
was accepted without error diagnostic.
Build and regtested on x86-64-gnu-linux.
OK for the trunk?
Tobias
-------------- next part --------------
A non-text attachment was scrubbed...
Name: nullinit.diff
Type: text/x-patch
Size: 2553 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20130103/105a673c/attachment.bin>
More information about the Fortran
mailing list