• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1! RUN: %S/test_errors.sh %s %t %f18
2
3! Test deallocate of use- and host-associated variables
4module m1
5  real, pointer :: a(:)
6  real, allocatable :: b(:)
7end
8
9subroutine s1()
10  use m1
11  complex, pointer :: c(:)
12  complex, allocatable :: d(:)
13  complex :: e(10)
14  deallocate(a)
15  deallocate(b)
16contains
17  subroutine s2()
18    deallocate(a)
19    deallocate(b)
20    deallocate(c)
21    deallocate(d)
22    !ERROR: name in DEALLOCATE statement must have the ALLOCATABLE or POINTER attribute
23    deallocate(e)
24  end subroutine
25end
26