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.
32 lines
555 B
32 lines
555 B
! RUN: %S/test_errors.sh %s %t %f18
|
|
! Check for type errors in DEALLOCATE statements
|
|
|
|
INTEGER, PARAMETER :: maxvalue=1024
|
|
|
|
Type dt
|
|
Integer :: l = 3
|
|
End Type
|
|
Type t
|
|
Type(dt) :: p
|
|
End Type
|
|
|
|
Type(t),Allocatable :: x
|
|
|
|
Real :: r
|
|
Integer :: s
|
|
Integer :: e
|
|
Integer :: pi
|
|
Character(256) :: ee
|
|
Procedure(Real) :: prp
|
|
|
|
Allocate(x)
|
|
|
|
!ERROR: Must have CHARACTER type, but is INTEGER(4)
|
|
Deallocate(x, stat=s, errmsg=e)
|
|
|
|
!ERROR: Must have INTEGER type, but is REAL(4)
|
|
!ERROR: Must have CHARACTER type, but is INTEGER(4)
|
|
Deallocate(x, stat=r, errmsg=e)
|
|
|
|
End Program
|