[Bug fortran/53544] New: Derived-type components in namelist group declaration produces error
townsend at astro dot wisc.edu
gcc-bugzilla@gcc.gnu.org
Thu May 31 18:51:00 GMT 2012
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: unassigned@gcc.gnu.org
ReportedBy: townsend@astro.wisc.edu
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.
More information about the Gcc-bugs
mailing list