This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug fortran/33370] New: Passing structure component arrays as actual arguments


... 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]