Break circular dependency between FIR dialect and utilities
[llvm-project.git] / flang / test / Semantics / deallocate04.f90
blob32ead587d8c7253936247263ffe675bf47680252
1 ! RUN: %python %S/test_errors.py %s %flang_fc1
2 ! Check for type errors in DEALLOCATE statements
4 INTEGER, PARAMETER :: maxvalue=1024
6 Type dt
7 Integer :: l = 3
8 End Type
9 Type t
10 Type(dt) :: p
11 End Type
13 Type(t),Allocatable :: x
15 Real :: r
16 Integer :: s
17 Integer :: e
18 Integer :: pi
19 Character(256) :: ee
20 Procedure(Real) :: prp
22 Allocate(x)
24 !ERROR: Must have CHARACTER type, but is INTEGER(4)
25 Deallocate(x, stat=s, errmsg=e)
27 !ERROR: Must have INTEGER type, but is REAL(4)
28 !ERROR: Must have CHARACTER type, but is INTEGER(4)
29 Deallocate(x, stat=r, errmsg=e)
31 End Program