aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gfortran.dg/deallocate_alloc_opt_2.f90
blob: 0df75825195a0215257ec74b55b52bf4b1d77c75 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
! { dg-do compile }
subroutine sub(i, j, err)
   implicit none
   character(len=*), intent(in) :: err
   integer, intent(in) :: j
   integer, intent(in), allocatable :: i(:)
   integer, allocatable :: m(:)
   integer n
   deallocate(i)                    ! { dg-error "variable definition context" }
   deallocate(m, stat=j)            ! { dg-error "variable definition context" }
   deallocate(m,stat=n,errmsg=err)  ! { dg-error "variable definition context" }
end subroutine sub