public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/16937] New: Compiler segmentation fault - compound derived types are not acceptable function arguments
@ 2004-08-09 14:22 paulthomas2 at wanadoo dot fr
2004-08-09 16:03 ` [Bug fortran/16937] " pinskia at gcc dot gnu dot org
2004-08-09 17:45 ` reichelt at gcc dot gnu dot org
0 siblings, 2 replies; 3+ messages in thread
From: paulthomas2 at wanadoo dot fr @ 2004-08-09 14:22 UTC (permalink / raw)
To: gcc-bugs
! $ ../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
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2004-08-09 17:45 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-08-09 14:22 [Bug fortran/16937] New: Compiler segmentation fault - compound derived types are not acceptable function arguments paulthomas2 at wanadoo dot fr
2004-08-09 16:03 ` [Bug fortran/16937] " pinskia at gcc dot gnu dot org
2004-08-09 17:45 ` reichelt at gcc dot gnu dot org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).