Recently, I've been testing gfortran builds of some molecular dynamics code; AMBER (http://amber.scripps.edu/) and found a strange quirk in the READ function when using namelists. I'm not sure if this is a bug; but the behaviour is inconsistent with other F90 compilers. The host system is i686 Fedora Core 5 running gcc-gfortran 4.1.1 ( gcc version 4.1.1 20060525 (Red Hat 4.1.1-1)).
>From my testing, I've managaged to generate the following testcase: program main integer ihp(2,2) NAMELIST /test/ ihp open(UNIT=22, STATUS='scratch') write (22, '(a)') & "&test", & "ihp(1,1) = 2*1", & "ihp(1,2) = 2", & "/" rewind (22) READ (UNIT=22, NML=test) print *,ihp end program main With gfortran, the following error is returned on execution: $ gfortran ./test.f90 -o ./test ; ./test At line 16 of file ./test.f90 Fortran runtime error: Repeat count too large for namelist object ihp But, if the code is compiled with ifort 9.0.033: $ ifort ./test.f90 -o ./test ; ./test 1 1 2 0 The "expected" behaviour is seen. -- Summary: Namelist issues when reading in asterisk preceeded arrays Product: gcc Version: 4.1.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: libfortran AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: mjw99 at ic dot ac dot uk http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30193