This compilation problem prevents SPECmpi benchmark 115.fds4 (file read.f) from compiling with gfortran. Here is an example of the problem:
% cat read.f MODULE READ CONTAINS SUBROUTINE READ_SPRK OPEN(95,FILE='dat',FORM='FORMATTED',STATUS='OLD') IF (IOS.EQ.0) READ(95,*) K END SUBROUTINE END MODULE % gfortran -c read.f In file read.f:5 IF (IOS.EQ.0) READ(95,*) K 1 Error: Expected VARIABLE at (1) % gfortran -v Using built-in specs. Target: x86_64-suse-linux Configured with: ../configure --enable-threads=posix --prefix=/usr --with-local-prefix=/usr/local --infodir=/usr/share/info --mandir=/usr/share/man --libdir=/usr/lib64 --libexecdir=/usr/lib64 --enable-languages=c,c++,objc,fortran,obj-c++,java,ada --enable-checking=release --with-gxx-include-dir=/usr/include/c++/4.1.2 --enable-ssp --disable-libssp --disable-libgcj --with-slibdir=/lib64 --with-system-zlib --enable-shared --enable-__cxa_atexit --enable-libstdcxx-allocator=new --program-suffix= --enable-version-specific-runtime-libs --without-system-libunwind --with-cpu=generic --host=x86_64-suse-linux Thread model: posix gcc version 4.1.2 20070115 (SUSE Linux) % A workaround is to break the IF statement into an IF block. -- Summary: Error: Expected VARIABLE at (1) Product: gcc Version: 4.1.2 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: eugene dot loh at sun dot com http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39953