gcc/testsuite/gfortran.dg/reshape_4.f90
raw| 1 | ! { dg-do run } |
| 2 | ! { dg-options "-fbounds-check" } |
| 3 | program main |
| 4 | real, dimension(2,2) :: result |
| 5 | real, dimension(6) :: source |
| 6 | real, dimension(2) :: pad |
| 7 | |
| 8 | call random_number (source) |
| 9 | call random_number (pad) |
| 10 | |
| 11 | result = reshape(source, shape(result),pad=pad(1:0)) |
| 12 | result = reshape(source, shape(result)) |
| 13 | result = reshape(source, shape(result),pad=pad) |
| 14 | |
| 15 | end program main |