c THIS GFORTRAN PROGRAM IS COMPILED FINE WITH
c real*8 r
c L=Distance(r)
c OR WHITHOUT MODULE Subroutines
C BAT NOT WITH THIS DATA TYPE STRUCTURE.
c
c GCC 4.0 AND 4.1 UBUNTU LINUX 6.10
c
c type Coord
c Real*8 X
c Real*8 Y
c Real*8 Z
c end type Coord
c
c eps.f:19: internal compiler error: Segmentation fault
c Please submit a full bug report,
c with preprocessed source if appropriate.
c See <URL:http://gcc.gnu.org/bugs.html> for instructions.
c For Debian GNU/Linux specific bug reporting instructions,
c see <URL:file:///usr/share/doc/gcc-4.0/README.Bugs>.
program Sad
Use Subroutines
call Newcomp(i)
end program Sad
subroutine newcomp(i)
use Subroutines
type Coord
Real*8 X
Real*8 Y
Real*8 Z
end type Coord
type (Coord) :: Point1
type (Coord) :: Point2
L=Distance(Point1,Point2)
c real*8 r
c L=Distance(r)
end subroutine newcomp
MODULE Subroutines
CONTAINS
c function Distance(r)
function Distance(Point1,Point2)
c real*8 r
type Coord
Real*8 X
Real*8 Y
Real*8 Z
end type Coord
type (Coord) :: Point1
type (Coord) :: Point2
end function Distance
end MODULE Subroutines
--
Summary: gfortran MODULE bug for non trivial data types
Product: gcc
Version: 4.1.1
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: fortran
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: catauro_giovanni at inwind dot it
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30411