5 ! Contributed by Jonathan Hogg and Steve Kargl.
10 integer, allocatable :: b(:), d(:)
11 character(len=80) :: err
12 character(len=80), allocatable :: str(:)
20 allocate(c%b(2), errmsg=c%err, stat=c%d(1)) ! OK
21 deallocate(c%b, errmsg=c%err, stat=c%d(1)) ! OK
22 allocate(c%b(2), errmsg=c%err, stat=c%b(1)) ! { dg-error "the same ALLOCATE statement" }
23 deallocate(c%b, errmsg=c%err, stat=c%b(1)) ! { dg-error "the same DEALLOCATE statement" }
24 allocate(c%str(2), errmsg=c%str(1), stat=j) ! { dg-error "the same ALLOCATE statement" }
25 deallocate(c%str, errmsg=c%str(1), stat=j) ! { dg-error "the same DEALLOCATE statement" }