2017-02-20 Paul Thomas <pault@gcc.gnu.org>
[official-gcc.git] / gcc / testsuite / gfortran.dg / transpose_intrinsic_func_call_1.f90
blob53d727d9b286859c8b4f660122ce04d6483b2d96
1 ! { dg-do run }
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
7 ! Original testcase by Martien Huelsen <m.a.hulsen@tue.nl>
8 ! Reduced by Tobias Burnus <burnus@net-b.de>
10 program 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)) call abort
20 contains
21 subroutine two()
22 allocate(coor(3,2))
23 coor = 99
24 a = 12
25 end subroutine
26 end program elastic2