Bug 281331 - gfortran segfaults on innocuous line
gfortran segfaults on innocuous line
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: gcc4 (Show other bugs)
All Linux
medium Severity low
: ---
: ---
Assigned To: Jakub Jelinek
Depends On:
  Show dependency treegraph
Reported: 2007-09-06 15:41 EDT by William Daffer
Modified: 2008-10-06 10:23 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2008-10-06 10:22:46 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
The source file that caused the segfault (68.44 KB, text/x-fortran)
2007-09-06 15:41 EDT, William Daffer
no flags Details

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

  None (edit)
Description William Daffer 2007-09-06 15:41:54 EDT
Description of problem:

gfortran segfaults on rather innocuous line. It doesn't if I take that line out
and compile it in a little standalone program (which is why I'm sending you a
long source file, instead of a short little testcase file)

Version-Release number of selected component (if applicable):
[12:28][{727}]% gfortran -v
Using built-in specs.
Target: i386-redhat-linux
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man
--infodir=/usr/share/info --enable-shared --enable-threads=posix
--enable-checking=release --with-system-zlib --enable-__cxa_atexit
--disable-libunwind-exceptions --with-gxx-include-dir=/usr/include/c++/3.4.3
--enable-libgcj-multifile --enable-languages=c,c++,java,f95
--enable-java-awt=gtk --disable-dssi
--with-java-home=/usr/lib/jvm/java-1.4.2-gcj- --with-cpu=generic
Thread model: posix
gcc version 4.1.1 20070105 (Red Hat 4.1.1-53)

How reproducible:
Every time, on the one machine I tried it on.

Steps to Reproduce:
1. Take the attached file and compile with the following options

test_gfortran: metfields_ACEv2.2MetO-gfortran.f
	gfortran -g -ff2c -std=gnu -ffixed-line-length-240 -fno-automatic \
	-fsecond-underscore -fbounds-check -Wall -fd-lines-as-code \
	-Wnonstd-intrinsics \
	-o meto_with_gfortran metfields_ACEv2.2MetO-gfortran.f \
	-L/users/whdaffer/lib -lREAD-gfort  -lPV-gfort \
        -lREAD-gfort -lopen-gfort -lutil\
	-L/software/toolkit/g77/hdfeos/lib/linux -lhdfeos -lGctp \
	-L/software/toolkit/g77/hdf/lib -lmfhdf -ldf -ljpeg -lsz -lz

There are some missing include files and the libraries aren't there, of course,
but the compiler segfaults before the link stage anyway and the same error
occurs when I omit the include options as does when I don't.

Actual results:

Expected results:

Additional info:
Comment 1 William Daffer 2007-09-06 15:41:54 EDT
Created attachment 189171 [details]
The source file that caused the segfault
Comment 2 Jakub Jelinek 2007-09-10 11:17:55 EDT
This is ICE on invalid:
      logical gotinfile/.false./,
     &     gotoutfile/.false./,  
     &     gotglcfile/.false./,  

      logical infile_exists/.false./,
     &        glcfile_exists/.false./
      logical verbose/.false./

has an extraneous ,
Small self-contained testcase:
      program rhbz281331
      logical a/.false./, b/.false./,
      logical c/.false./
Both GCC 4.1.x and 4.2.x ICE on this, but current GCC trunk does not, will find
which change fixed this and if it is backportable.
Comment 3 RHEL Product and Program Management 2008-09-05 13:12:03 EDT
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux maintenance release.  Product Management has requested
further review of this request by Red Hat Engineering, for potential
inclusion in a Red Hat Enterprise Linux Update release for currently deployed
products.  This request is not yet committed for inclusion in an Update
Comment 4 Jakub Jelinek 2008-10-06 10:22:46 EDT
This doesn't ICE any longer with gcc4-gfortran-4.1.2-42.EL4.

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