This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/24276] New: Components of a derived type array not passed as an array
- From: "pault at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 8 Oct 2005 17:30:03 -0000
- Subject: [Bug fortran/24276] New: Components of a derived type array not passed as an array
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
program test_lex
type :: dtype
integer :: n
character*12 :: word
end type dtype
type(dtype), dimension(2) :: list
list(1) = dtype (1 , "one")
list(2) = dtype (2 , "two")
call foo (list%word)
contains
subroutine foo (slist)
character*12, dimension(*) :: slist
print *, ("\n",slist(i), i=1,2)
end subroutine foo
end program test_lex
produces the output
[prt@localhost meissner]# ./a.out
one
two
Examination of the code shows that the size of the derived type is not being
used to determine the stride of the array in the function. This is one and the
same as the problem with pointer arrays pointing to same kind components of a
derived type array, which Tobi is fond of.
--
Summary: Components of a derived type array not passed as an
array
Product: gcc
Version: 4.1.0
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: fortran
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: pault at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24276