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.
*** This bug has been marked as a duplicate of bug 492209 ***
Oops, sorry, meant to update #487019 instead.
This works just fine with gfortran43.
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
This is upstream PR30554 and the backported patch I'm going to attach cures it.
Created attachment 342868 [details] gcc41-pr30554.patch
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