Merge from mainline (165734:167278).
[official-gcc/graphite-test-results.git] / gcc / testsuite / gfortran.dg / transpose_2.f90
blob4ab3bc4bb1a8ce9e643dea60a3dda09e0afb450b
1 ! { dg-do run }
2 ! { dg-options "-fbounds-check -fno-realloc-lhs" }
3 ! { dg-shouldfail "Incorrect extent in return value of TRANSPOSE intrinsic in dimension 1: is 2, should be 3" }
4 program main
5 implicit none
6 character(len=10) :: in
7 real, dimension(:,:), allocatable :: a,b
8 integer :: ax, ay, bx, by
10 in = "2 2 3 2"
11 read (unit=in,fmt='(4I2)') ax, ay, bx, by
12 allocate (a(ax,ay))
13 allocate (b(bx,by))
14 a = 1.0
15 b = 2.1
16 b = transpose(a)
17 end program main
18 ! { dg-output "Fortran runtime error: Array bound mismatch for dimension 1 of
19 ! array 'b' (3/2)" }