2 ! PR fortran/101564 - ICE in resolve_allocate_deallocate
6 integer, allocatable
:: x(:)
17 type(t
), allocatable
:: y
19 character(len
=:), allocatable
:: s
22 allocate (character(42) :: z
%s
, stat
=stat
)
23 allocate (x(2), stat
=stat
)
24 deallocate (x
, stat
=stat
)
25 allocate (A
, stat
=f())
26 deallocate (A
, stat
=f())
27 allocate (A
, stat
=y
%stat
)
28 deallocate (A
, stat
=y
%stat
)
29 allocate (A
, stat
=stat
, errmsg
=c(2:79))
30 deallocate (A
, stat
=stat
, errmsg
=c(2:79))
31 allocate (A
, stat
=stat
, errmsg
=z
%s
)
32 deallocate (A
, stat
=stat
, errmsg
=z
%s
)
33 allocate (A
, stat
=stat
, errmsg
=z
%s(2:39))
34 deallocate (A
, stat
=stat
, errmsg
=z
%s(2:39))
35 allocate (A
, stat
=y
%r
) ! { dg-error "must be a scalar INTEGER variable" }
36 deallocate (A
, stat
=y
%r
) ! { dg-error "must be a scalar INTEGER variable" }
37 allocate (x(2), stat
=stat
%kind
) ! { dg-error "STAT tag" }
38 deallocate (x
, stat
=stat
%kind
) ! { dg-error "STAT variable" }
39 allocate (A
, stat
=A
%kind
) ! { dg-error "STAT tag" }
40 deallocate (A
, stat
=A
%kind
) ! { dg-error "STAT variable" }
41 allocate (A
, stat
=c
%len
) ! { dg-error "STAT tag" }
42 deallocate (A
, stat
=c
%len
) ! { dg-error "STAT variable" }
43 allocate (A
, stat
=y
%stat
%kind
) ! { dg-error "STAT tag" }
44 deallocate (A
, stat
=y
%stat
%kind
) ! { dg-error "STAT variable" }
45 allocate (y
, stat
=y
%stat
) ! { dg-error "within the same ALLOCATE statement" }
46 allocate (y
, stat
=r
) ! { dg-error "must be a scalar INTEGER variable" }
47 allocate (A
, stat
=y
%z
%re
) ! { dg-error "must be a scalar INTEGER variable" }
48 deallocate (A
, stat
=y
%z
%im
) ! { dg-error "must be a scalar INTEGER variable" }
49 allocate (y
, stat
=g()) ! { dg-error "must be a scalar INTEGER variable" }
50 deallocate (y
, stat
=g()) ! { dg-error "must be a scalar INTEGER variable" }
51 allocate (A
, stat
=f
) ! { dg-error "requires an argument list" }
52 deallocate (A
, stat
=f
) ! { dg-error "requires an argument list" }
53 allocate (y
, stat
=g
) ! { dg-error "requires an argument list" }
54 deallocate (y
, stat
=g
) ! { dg-error "requires an argument list" }
55 allocate (A
, stat
=z
%s
%len
) ! { dg-error "parameter inquiry" }
56 deallocate (A
, stat
=z
%s
%len
) ! { dg-error "parameter inquiry" }
57 allocate (A
, stat
=f(), errmsg
="") ! { dg-error "ERRMSG variable" }
58 deallocate (A
, stat
=f(), errmsg
="") ! { dg-error "ERRMSG variable" }
59 allocate (A
, stat
=stat
, errmsg
=z
%s
%len
) ! { dg-error "ERRMSG variable" }
60 deallocate (A
, stat
=stat
, errmsg
=z
%s
%len
) ! { dg-error "ERRMSG variable" }
61 deallocate (z
%s
, stat
=stat
, errmsg
=z
%s
) ! { dg-error "within the same DEALLOCATE statement" }