In the following program the size of the array "a" is exeeded not of "t%b", but gfortran claims otherwise:
Fortran runtime error: Array reference out of bounds for array 't', upper bound of dimension 3 exceeded (in file 'test.f90', at line 10) (That gfortran shows "t" rather than "b" or "t%b" is PR29800 and quit unrelated.) program main type test real, allocatable, dimension(:,:) :: b end type test real, allocatable, dimension(:,:,:) :: a type(test) :: t integer :: i allocate(a(5,1,1), t%b(5,3)) t%b = 45.0 do i = 1,2 a(1:5,1,i) = t%b(1:5,i) end do end program main -- Summary: Array out of bounds gives name of LHS array not RHS Product: gcc Version: 4.3.0 Status: UNCONFIRMED Keywords: diagnostic Severity: normal Priority: P3 Component: fortran AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: burnus at gcc dot gnu dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30073