John Reid, The new features of Fortran 2008, chapter 5.5:
A pointer may be initially associated with a target:
type (entry), target :: bottom
type (entry), pointer :: top => bottom
*****
Currently gfortran responds with:
type (entry), pointer :: top => bottom
1
Error: Pointer initialization requires a NULL() at (1)
*****
A look at the current draft of F08 seems to indicate that this is allowed for
any kind of pointer: Data pointers and data pointer components as well as
procedure pointers and procedure pointer components. See:
R442 component-initialization
R443 initial-data-target
C460
R505 initialization
C511
R1216 proc-pointer-init
R1217 initial-proc-target
Note: For procedure-pointer components I was not able to find any specific
reference to non-NULL default initialization. However, chapter 4.5.4.6
("Default initialization for components") explicitly mentions the possibility
of having an initial-proc-target for a PPC.
--
Summary: [F08] pointer initialization
Product: gcc
Version: 4.6.0
Status: UNCONFIRMED
Keywords: rejects-valid
Severity: normal
Priority: P3
Component: fortran
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: janus at gcc dot gnu dot org
OtherBugsDependingO 39627
nThis:
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45290