Hi! Compiling the following:
subroutine Test ( Verbose, Position ) logical, intent(in) :: Verbose integer, intent(in) :: Position integer, parameter :: Anchor = 666, Cut_off = 3 if ( ( Verbose ) .and. ( abs ( Position - Anchor ) le. Cut_off ) ) then write(*,*) "Been there, got the tee-shirt!" endif return end subroutine Test Yields this quite misleading error message: Source.f90:5.50: if ( ( Verbose ) .and. ( abs ( Position - Anchor ) le. Cut_off ) ) then 1 Error: Expected a right parenthesis in expression at (1) Source.f90:7.3: endif 1 Error: Expecting END SUBROUTINE statement at (1) whereas the typo is actually a missing "." For the record, the Lahey compiler manages an intelligible message, the Intel one also (with some further garbage), but the Sun one gives the same answer as GFortran... Cheers! Philippe PS: I am using: gfortran -v Using built-in specs. Target: i686-pc-linux-gnu Configured with: /USER/philippe/Irix/Gcc_Sources/configure --prefix=/usr1/MICRESS/Philippe/Tools/Gcc --enable-languages=c,fortran --disable-maintainer-mode --disable-shared --with-mpfr=/usr1/MICRESS/Philippe/Tools/Mpfr --with-gmp=/usr1/MICRESS/Philippe/Tools/Gmp --with-htmldir Thread model: posix gcc version 4.3.0 20070530 (experimental) -- Summary: Misleading compilation diagnostic Product: gcc Version: 4.3.0 Status: UNCONFIRMED Severity: enhancement Priority: P3 Component: fortran AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: P dot Schaffnit at access dot rwth-aachen dot de http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32151