(j3.2006) Allocattable and namelist object
Mon Feb 15 06:32:02 EST 2010
kargls at comcast.net posted this to comp.lang.fortran
He now wants to submit an interp about it.
I've asked him to write his question in the form he'd
like to submit, and I'll post it to the list.
If there's something obvious that makes this go away,
I missed it. Richard's reply in c.l.f also indicates
there may be an issue. It appears to be awkward language
Have fun in Vegas. ;-)
On 2010-02-14 15:50:20 -0500, steve <kargls at comcast.net> said:
> Someone has reported a bug against gfortran that suggests that
> following code is legal Fortran 2003.
> PROGRAM MAIN
> REAL, DIMENSION(:), ALLOCATABLE :: TAB
> END PROGRAM MAIN
> Gfortran currently issues an error in accordance with a
> constraint in Fortran 95:
> F95, Sec 5.4, p. 66
> A namelist-group-object shall not be an array dummy
> argument with a nonconstant bound, a variable with
> nonconstant character length, an automatic object,
> a pointer, a variable of a type that has an ultimate
> component that is a pointer, or an allocatable array.
> In checking the Fortran 2003 standard, the above constraint
> has been removed. Further searching leads to two passages
> that appear to be in conflict.
> F2003, Sec. 5.4, p. 95
> A namelist group object shall either be accessed by use
> or host association or shall have its type, type parameters,
> and shape specified by previous specification statements or
> the procedure heading in the same scoping unit or by the
> implicit typing rules in effect for the scoping unit.
> F2003, Sec. 188.8.131.52,
> Every allocatable namelist-group-object in the namelist group
> shall be allocated and every namelist-group-object that is a
> pointer shall be associated with a target.
> The statement from Sec. 5.4 states that a "namelist group object
> ... shall have its type, type parameters, and shape specified
> by previous specification statements". In the above code, the
> shape has not been specified prior to the namelist statement.
> However, the statement from Sec. 184.108.40.206 suggests that an allocatable
> array can be in a namelist object.
> Are these statements in conflict or am I missing some other
> part of the Fortran 2003 standard?
More information about the J3