Bug 483845 - gfortran segfaults on compilation of code
Summary: gfortran segfaults on compilation of code
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: gcc
Version: 5.5
Hardware: All
OS: Linux
low
medium
Target Milestone: rc
: ---
Assignee: Jakub Jelinek
QA Contact: BaseOS QE
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2009-02-03 21:17 UTC by James Keener
Modified: 2009-09-02 11:43 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2009-09-02 11:43:43 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
gcc41-pr30554.patch (6.11 KB, patch)
2009-05-07 16:14 UTC, Jakub Jelinek
no flags Details | Diff


Links
System ID Private Priority Status Summary Last Updated
GNU Compiler Collection 30554 0 None None None Never
Red Hat Product Errata RHBA-2009:1376 0 normal SHIPPED_LIVE gcc bug fix update 2009-09-01 11:41:20 UTC

Description James Keener 2009-02-03 21:17:21 UTC
Description of problem:
gfortran segfaults

Version-Release number of selected component (if applicable):
GNU Fortran (GCC) 4.1.2 20071124 (Red Hat 4.1.2-42)
CentOS release 5.2 (Final)
RHEL 5.2
RHEL 5.3

How reproducible:
Compiling certain fortran source

Steps to Reproduce:
1. Download fdynamo (http://www.pdynamo.org/mainpages/downloads.html#fdynamo)
2. run the install script
3. make library
  
Actual results:
an Error: "source/energy.F90:0: internal compiler error: Segmentation fault"

Expected results:
A library

Additional info:
This has happened on three independent systems CentOS 5.2, RHEL 5.2 and 5.3

This may be a manifestation of bug 435964 (https://bugzilla.redhat.com/show_bug.cgi?id=435964), but I cannot tell for sure or if it is a different bug.

Comment 1 Jakub Jelinek 2009-05-07 08:40:05 UTC

*** This bug has been marked as a duplicate of bug 492209 ***

Comment 2 Jakub Jelinek 2009-05-07 08:40:48 UTC
Oops, sorry, meant to update #487019 instead.

Comment 3 Jakub Jelinek 2009-05-07 08:53:40 UTC
This works just fine with gfortran43.

Comment 4 Jakub Jelinek 2009-05-07 10:09:41 UTC
Simplified testcase:
module m1
  integer :: n = 0
  end module m1
module m2
  use m1, only : n
  implicit none
contains
  subroutine s(a)
    real, dimension(1:3,1:n), intent(inout), optional :: a
  end subroutine s
end module m2
module m3
  use m1, only : n
  use m2, only : s
end module m3

Comment 5 Jakub Jelinek 2009-05-07 16:10:47 UTC
This is upstream PR30554 and the backported patch I'm going to attach cures it.

Comment 6 Jakub Jelinek 2009-05-07 16:14:31 UTC
Created attachment 342868 [details]
gcc41-pr30554.patch

Comment 16 errata-xmlrpc 2009-09-02 11:43:43 UTC
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 therefore 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-2009-1376.html


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