http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46978
--- Comment #3 from Tobias Burnus <burnus at gcc dot gnu.org> 2010-12-16 14:48:53 UTC --- Reduced test case: program elastic2 implicit none type mesh_t real, allocatable, dimension(:,:) :: coor end type mesh_t type(mesh_t) :: mesh3 real, allocatable, dimension(:) :: a integer :: nno nno = 13 call two(mesh3, nno) allocate(a(2*nno)) a = 1 mesh3%coor = transpose ( reshape ( a, (/2,nno/) ) ) contains subroutine two(x,nno) type(mesh_t) :: x integer :: nno allocate(x%coor(nno,2)) x%coor = 99 end subroutine end program elastic2