http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50109
Bug #: 50109 Summary: Formatted namelist read with multiple "!" fails with: Cannot match namelist object name ! Classification: Unclassified Product: gcc Version: 4.6.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran AssignedTo: unassig...@gcc.gnu.org ReportedBy: han...@physics.auburn.edu Created attachment 25037 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=25037 Fortran source files to show the bug. A namelist read of the file $indata NFP = 5, ! ! ! / results in: Fortran runtime error: Cannot match namelist object name ! I have produced the error with gcc 4.6.0: gfortran -v Using built-in specs. COLLECT_GCC=gfortran COLLECT_LTO_WRAPPER=/usr/local/libexec/gcc/x86_64-apple-darwin10.4.0/4.6.0/lto-wrapper Target: x86_64-apple-darwin10.4.0 Configured with: ../gcc-4.6-20101106/configure --enable-languages=fortran Thread model: posix gcc version 4.6.0 20101106 (experimental) (GCC) and on gcc 4.4.3: f95 -v Using built-in specs. Target: x86_64-linux-gnu Configured with: ../src/configure -v --with-pkgversion='Ubuntu 4.4.3-4ubuntu5' --with-bugurl=file:///usr/share/doc/gcc-4.4/README.Bugs --enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr --enable-shared --enable-multiarch --enable-linker-build-id --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.4 --program-suffix=-4.4 --enable-nls --enable-clocale=gnu --enable-libstdcxx-debug --enable-plugin --enable-objc-gc --disable-werror --with-arch-32=i486 --with-tune=generic --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu Thread model: posix gcc version 4.4.3 (Ubuntu 4.4.3-4ubuntu5) I'm sorry, I rely on others to install compilers, so I can't test it on other versions. This seems very similar to Bug 49791 Attached is a short code which produces the error.