... doesn't work:

$ cat foo.f90
program main
  type foo
     integer :: i
     character(len=2) :: c
  end type foo
  type(foo), dimension(4) :: a
  a%i = (/ 12, 2, 3, 10 /)
  a%c = 'xy'
  print *,maxval(a%i)
  print *,maxloc(a%i)
  call bar(a%i)
contains
  subroutine bar(b)
    integer, dimension(:) :: b
    print *,b
  end subroutine bar
end program main
$ gfortran foo.f90
$ ./a.out
          68
           3
          12           3          68           0


-- 
           Summary: Passing structure component arrays as actual arguments
           Product: gcc
           Version: 4.3.0
            Status: UNCONFIRMED
          Keywords: wrong-code
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: tkoenig at gcc dot gnu dot org
OtherBugsDependingO 32834
             nThis:


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33370

Reply via email to