http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53544
Bug #: 53544
Summary: Derived-type components in namelist group declaration
produces error
Classification: Unclassified
Product: gcc
Version: 4.7.1
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: fortran
AssignedTo: [email protected]
ReportedBy: [email protected]
Created attachment 27533
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=27533
Example program illustrating namelist problem
In the attached example program, the use of derived-type components in the
namelist group declaration causes the following errors:
foo.f90:12.19:
namelist /bar/ ct%a, ct%b
1
Error: Syntax error in NAMELIST statement at (1)
foo.f90:14.17:
read(*, NML=bar)
1
Error: Symbol 'bar' at (1) must be a NAMELIST group name
It is my understanding that the variables in a namelist group declaration must
not be a dummy array with non-constant bound, a variable with non-constant
character length, an automatic object, an allocatable array, a pointer, or have
a component at any depth that is a pointer or is inaccessible. The case in the
example program falls into none of these categories, and therefore should be
accepted by the compiler as valid code.