You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

26 lines
520 B

! RUN: %S/test_errors.sh %s %t %f18
! Test deallocate of use- and host-associated variables
module m1
real, pointer :: a(:)
real, allocatable :: b(:)
end
subroutine s1()
use m1
complex, pointer :: c(:)
complex, allocatable :: d(:)
complex :: e(10)
deallocate(a)
deallocate(b)
contains
subroutine s2()
deallocate(a)
deallocate(b)
deallocate(c)
deallocate(d)
!ERROR: name in DEALLOCATE statement must have the ALLOCATABLE or POINTER attribute
deallocate(e)
end subroutine
end