3 ! PR fortran/37203 - check RESHAPE arguments
6 integer, dimension(6) :: source1
= (/ 1, 2, 3, 4, 5, 6 /)
7 integer, dimension(2) :: shape1
= (/ 2, 5/)
8 integer, dimension(2) :: pad1
= (/ 0, 0/)
9 integer, dimension(2) :: t(2,5)
11 t
= reshape(source1
, shape1
, pad1
, (/2, 1/)) ! ok
12 t
= reshape(source1
, shape1
, pad1
, (/2.1, 1.2/)) ! { dg-error "must be INTEGER" }
13 t
= reshape(source1
, shape1
, pad1
, (/2, 2/)) ! { dg-error "invalid permutation" }
14 t
= reshape(source1
, shape1
, pad1
, (/2, 3/)) ! { dg-error "out-of-range dimension" }
15 t
= reshape(source1
, shape1
, pad1
, (/2/)) ! { dg-error "wrong number of elements" }