summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gfortran.dg/allocate_alloc_opt_5.f90
blob: d7e3ea93f1bebc351278690d19dd9928b61d82b2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
! { dg-do compile }
! { dg-options "-std=f95" }
program a

  implicit none

  integer n
  character(len=70) str
  integer, allocatable :: i(:)

  n = 42
  allocate(i(4), source=n) ! { dg-error "Fortran 2003: SOURCE tag" }
  allocate(i(4), stat=n, errmsg=str) ! { dg-error "Fortran 2003: ERRMSG tag" }

end program a