summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gfortran.dg/reshape_zerosize_2.f90
blob: 474ea300d1cc88e64316fb77816f0b2e6b038399 (plain)
1
2
3
4
5
6
7
8
9
10
11
! { dg-do run }

  ! Simplifier of RESHAPE was broken when reshaping an empty array.
  INTEGER, PARAMETER :: empty(0,0) = RESHAPE(SHAPE(1), (/0, 0/))

  ! same with surplus padding
  INTEGER, PARAMETER :: empty_padding(0,0) = RESHAPE(SHAPE(1), (/0, 0/), PAD=( (/ 1, 2 /) ))

  ! same with required padding
  INTEGER, PARAMETER :: non_empty(2,2) = RESHAPE(SHAPE(1), (/2, 2/), PAD=( (/ 1, 2 /) ))
END