This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/31818] New: Wrongly accepts namelists with assumed-sized arrays
- From: "burnus at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 4 May 2007 16:52:09 -0000
- Subject: [Bug fortran/31818] New: Wrongly accepts namelists with assumed-sized arrays
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
subroutine test(cha)
implicit none
character(len=10) :: cha(:)
namelist /z/ cha
end subroutine test
See also:
gfortran.dg/namelist_14.f90
This is invalid:
"5.4 NAMELIST statement"
"C574 (R553) A namelist-group-object shall not be an assumed-size array."
Other compilers reject this:
ifort: A NAMELIST group object must not be an array with nonconstant bounds.
[CHA]
g95: Variable 'cha' at (1) must have an explicit shape to be in a NAMELIST
NAG f95: Namelist-group-object CHA is an array dummy with non-constant bounds
--
Summary: Wrongly accepts namelists with assumed-sized arrays
Product: gcc
Version: 4.3.0
Status: UNCONFIRMED
Keywords: accepts-invalid
Severity: normal
Priority: P3
Component: fortran
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: burnus at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31818