[J3] USE association of namelist groups?
Steven G. Kargl
kargl at troutmask.apl.washington.edu
Fri Nov 23 12:11:23 EST 2018
C8102 seems fairly clear:
C8102 (R868) The namelist-group-name shall not be a name accessed by
use association.
but if I go to section 14, one finds
14.2.2 The USE statement and use association
The USE statement specifies use association. A USE statement is a
reference to the module it specifies. At the time a USE statement
is processed, the public portions of the specified module shall be
available. ...
The USE statement provides the means by which a scoping unit accesses
named data objects, derived types, procedures, abstract interfaces,
generic identifiers, and namelist groups in a module.
So, what does "and namelist groups in a module" mean here? C8102 seems
to imply that a namelist-group-name is not in the public portion of
a module.
A bug has been reported for gfortran, because she rejects the
following code while ifort and NAG compile it.
module foo_nml
real :: x
namelist /foo/ x
end module
program main
use foo_nml, only: bar => foo
x = 42
write(*,nml=bar)
end program
Doesn't c8102 prevent the renaming of 'foo' as 'foo' isn't accessible?
--
Steve
More information about the J3
mailing list