summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gfortran.dg/allocate_stat_2.f90
blob: 7cf6d659ea29bd83e3dcfe6eff18fbe186365566 (plain)
1
2
3
4
5
6
7
8
9
10
! { dg-do compile }
! PR 41197
program main
  integer, dimension (4) :: ier = 0
  character(len=30), dimension(2) :: er
  integer, dimension (:), allocatable :: a
  allocate (a (16), stat = ier) ! { dg-error "must be a scalar INTEGER" }
  allocate (a (14), stat=ier(1),errmsg=er) ! { dg-error "must be a scalar CHARACTER" }
end