1! { dg-do run } 2! 3! PR fortran/46978 4! The coor assignment was using the wrong loop bounds if the argument to 5! transpose was an intrinsic function call 6! 7! Original testcase by Martien Huelsen <m.a.hulsen@tue.nl> 8! Reduced by Tobias Burnus <burnus@net-b.de> 9 10program elastic2 11 implicit none 12 real, allocatable, dimension(:,:) :: coor 13 real, allocatable, dimension(:) :: a 14 integer :: nno 15 nno = 3 16 allocate(a(2*nno)) 17 call two() 18 coor = transpose ( reshape ( a, (/2,nno/) ) ) 19 if (any(coor /= 12)) STOP 1 20contains 21 subroutine two() 22 allocate(coor(3,2)) 23 coor = 99 24 a = 12 25 end subroutine 26end program elastic2 27