This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/16937] New: Compiler segmentation fault - compound derived types are not acceptable function arguments
- From: "paulthomas2 at wanadoo dot fr" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 9 Aug 2004 14:22:32 -0000
- Subject: [Bug fortran/16937] New: Compiler segmentation fault - compound derived types are not acceptable function arguments
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
! $ ../bin/gfortran bug4.f90 -o test
! bug4.f90: In function `MAIN__':
! bug4.f90:30: internal compiler error: Segmentation fault
! Please submit a full bug report,
! with preprocessed source if appropriate.
! See <URL:http://gcc.gnu.org/bugs.html> for instructions.
!
!Apparently compound derived types are not acceptable function arguments
program Array_List
implicit none
character (len=5),dimension(3) :: carray = (/"one","two","three"/)
type :: Compound
integer :: Count
character (len = 4) :: Name
end type Compound
type :: Table
type (Compound) :: Data (2)
integer :: L_Size
end type Table
type (Compound) :: Element1 = Compound(1,"one")
type (Compound) :: Element2 = Compound(2,"two")
type (Table) :: ElementTable
ElementTable%Data(1) = Element1
ElementTable%Data(2) = Element2
ElementTable%L_size = 2
print *, test( ElementTable%Data(: ElementTable%L_size )%Name )
!! the following work correctly
!! print *, ElementTable%Data(: ElementTable%L_size )%Name
!! print *, test( carray )
stop
contains
function test ( list ) result ( num )
integer :: num
character (len=*) :: list(:)
num = Size( List )
return
end function test
end program Array_List
--
Summary: Compiler segmentation fault - compound derived types are
not acceptable function arguments
Product: gcc
Version: 3.5.0
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: fortran
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: paulthomas2 at wanadoo dot fr
CC: bdavis at gcc dot gnu dot org,gcc-bugs at gcc dot gnu
dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16937