Bug 164732 - gfortran cannot parse single-line nested arithmetic if statement
Summary: gfortran cannot parse single-line nested arithmetic if statement
Status: CLOSED RAWHIDE
Alias: None
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: gcc4 (Show other bugs)
(Show other bugs)
Version: 4.0
Hardware: ia64 Linux
medium
low
Target Milestone: ---
: ---
Assignee: Jakub Jelinek
QA Contact:
URL:
Whiteboard:
Keywords:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2005-07-31 07:05 UTC by Nate Crawford
Modified: 2007-11-30 22:07 UTC (History)
0 users

Fixed In Version: 4.0.1-4.EL4.1
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2005-08-06 11:49:53 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
GNU Compiler Collection 17229 None None None Never

Description Nate Crawford 2005-07-31 07:05:45 UTC
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
                      1
  Error: Unclassifiable statement in IF-clause at (1) 

After changing it to an if block:

        IF(INCX.EQ.INCY) THEN
           IF(INCX-1) 5,20,60
        ENDIF

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)

How reproducible:
allways

Steps to Reproduce:
1.take old ugly fortran
2.compile
3.
  
Actual results:
compilation error

Expected results:
no compilation error

Additional info:
  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.

-Nate

Comment 1 Jakub Jelinek 2005-08-06 11:49:53 UTC
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.


Note You need to log in before you can comment on or make changes to this bug.