Bug 173932 - gfortran crashes with message "internal compiler error: Segmentation fault"
gfortran crashes with message "internal compiler error: Segmentation fault"
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: gcc4 (Show other bugs)
4.0
x86_64 Linux
medium Severity medium
: ---
: ---
Assigned To: Jakub Jelinek
:
Depends On:
Blocks: 168429
  Show dependency treegraph
 
Reported: 2005-11-22 14:42 EST by Steve Dirkse
Modified: 2007-11-30 17:07 EST (History)
1 user (show)

See Also:
Fixed In Version: RHBA-2006-0127
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2006-03-07 13:25:35 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Fortran90 source to reproduce the bug (717 bytes, text/plain)
2005-11-22 14:44 EST, Steve Dirkse
no flags Details

  None (edit)
Description Steve Dirkse 2005-11-22 14:42:35 EST
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.7.12) Gecko/20050921 Red Hat/1.0.7-1.4.1 Firefox/1.0.7

Description of problem:
On my small test problem (I will attach it) I get:
$gfortran bug.f90
bug.f90: In function 'MAIN__':
bug.f90:19: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://bugzilla.redhat.com/bugzilla> for instructions.


Version-Release number of selected component (if applicable):
gcc4-gfortran-4.0.1-4.EL4.2

How reproducible:
Always

Steps to Reproduce:
1.get the file bug.f90 (attached)
2.run  "gfortran bug.f90"
3.
  

Actual Results:  See the Description

Expected Results:  I should have gotten some sort of compilation error, for example:
$ifort bug.f90
fortcom: Error: bug.f90, line 24: A CHARACTER data type is required in this context.   [ACCESS]
       ACCESS=acc, &
-------^
compilation aborted for bug.f90 (code 1)


Additional info:

Just in case the attachment doesn't work, here's the code:

PROGRAM bug
  CHARACTER(LEN=80) :: fln
  CHARACTER(LEN=40) :: stat, frm, posi
  CHARACTER     :: type
  INTEGER       :: iunit, fmode, format, errcod
  LOGICAL       :: filexs

  fln = '/home/steve/models/225a/gamsmatr.scr' 
  iunit = 17
  WRITE (6,*) 'opening file ', TRIM(fln)
  INQUIRE(FILE=fln,EXIST=filexs)
  IF (.NOT. filexs) THEN
     WRITE (6, *) 'Failed EXIST inquiry on file '//FLN
     STOP
  ENDIF
  stat = 'OLD'
  posi = 'REWIND'
  type = 'R'
  frm = 'UNFORMATTED'
  OPEN(UNIT=iunit, &
       FILE=fln, &
       STATUS=stat, &
       FORM=frm, &
       ACCESS=acc, &
       POSITION=posi, &
       IOSTAT=errcod, &
       ERR=991)

  STOP

  991 WRITE (6, *) 'File open error: ', errcod

END PROGRAM bug
Comment 1 Steve Dirkse 2005-11-22 14:44:26 EST
Created attachment 121367 [details]
Fortran90 source to reproduce the bug
Comment 2 Jakub Jelinek 2005-11-29 07:03:27 EST
Fixed upstream http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=107667
(also on trunk and gcc-4_1-branch).  Next gcc4 rpm set will contain the fix.
Comment 8 Red Hat Bugzilla 2006-03-07 13:25:35 EST
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on the solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2006-0127.html

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