summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gfortran.dg/pr91864.f90
blob: a17187dcdc0f6c4c23a3d919612539efec1be12c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
program p
   integer :: i
   read (*,*) i%kind   ! { dg-error "Expecting variable or io-implied-do" }
end

subroutine t
   integer, allocatable :: x(:)
   integer :: stat
   allocate (x(3), stat=stat%kind)   ! { dg-error "cannot be a constant" }
end

subroutine u
   integer, allocatable :: x(:)
   integer :: stat
   allocate (x(3), stat%kind=stat)   ! { dg-error "Unexpected constant" }
end

subroutine v
   integer, allocatable :: x(:)
   integer :: stat
   deallocate (x, stat%kind=stat)   ! { dg-error "Unexpected constant" }
end