Red Hat Bugzilla – Bug 164732
gfortran cannot parse single-line nested arithmetic if statement
Last modified: 2007-11-30 17:07:19 EST
Description of problem:
With some ancient, but working, fortran77 code, I ran into a little glitch.
Specifically, the command (and error message):
gfortran -O2 -w -ffixed-form [unimportant stuff]
IF(INCX.EQ.INCY) IF(INCX-1) 5,20,60
Error: Unclassifiable statement in IF-clause at (1)
After changing it to an if block:
the subroutine compiled cleanly.
Version-Release number of selected component (if applicable):
gcc version 4.0.0 20041214 (Red Hat 4.0.0-0.14.EL4)
Steps to Reproduce:
1.take old ugly fortran
no compilation error
This subroutine has been compiled correctly for years with many compilers on
many architectures, and is probably legal fortran77. I have not tried it with
gfortran on non-IA64 machines, but I suspect the bug exists across them all.
This is upstream PR17229, fixed in April. gfortran packages for RHEL4 U2 are
based on 20050727 gcc-4_0-rhl-branch (which is based on 20050727 gcc-4_0-branch),
so that fix is included.