summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gfortran.dg/reshape_4.f90
blob: 92208e57da59ee4152d9cba6281b7901701ecfca (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
! { dg-do run }
! { dg-options "-fbounds-check" }
program main
  real, dimension(2,2) :: result
  real, dimension(6) :: source
  real, dimension(2) :: pad

  call random_number (source)
  call random_number (pad)

  result = reshape(source, shape(result),pad=pad(1:0))
  result = reshape(source, shape(result))
  result = reshape(source, shape(result),pad=pad)

end program main