[flang] Accept polymorphic component element in storage_size
[llvm-project.git] / flang / test / Semantics / deallocate06.f90
blobdda9ee80db701c3239bdd5d341b2f45577401d7d
1 ! RUN: %python %S/test_errors.py %s %flang_fc1
3 ! Test deallocate of use- and host-associated variables
4 module m1
5 real, pointer :: a(:)
6 real, allocatable :: b(:)
7 end
9 subroutine s1()
10 use m1
11 complex, pointer :: c(:)
12 complex, allocatable :: d(:)
13 complex :: e(10)
14 deallocate(a)
15 deallocate(b)
16 contains
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
25 end