9 character(len
=70), allocatable
:: error(:)
11 integer, allocatable
:: i(:)
14 integer, allocatable
:: c(:), d(:)
19 allocate(i(2), stat
=x
) ! { dg-error "must be a scalar INTEGER" }
20 allocate(i(2), stat
=j
, stat
=k
) ! { dg-error "Redundant STAT" }
22 allocate(i(2))) ! { dg-error "Syntax error in ALLOCATE" }
23 allocate(i(2), errmsg
=err
, errmsg
=err
) ! { dg-error "Redundant ERRMSG" }
24 allocate(i(2), errmsg
=err
) ! { dg-warning "useless without a STAT" }
25 allocate(i(2), stat
=j
, errmsg
=x
) ! { dg-error "must be a scalar CHARACTER" }
27 allocate(err
) ! { dg-error "neither a data pointer nor an allocatable" }
29 allocate(error(2),stat
=j
,errmsg
=error(1)) ! { dg-error "shall not be ALLOCATEd within" }
30 allocate(i(2), stat
= i(1)) ! { dg-error "shall not be ALLOCATEd within" }
32 allocate(n
) ! { dg-error "must be ALLOCATABLE or a POINTER" }
34 allocate(i(2), i(2)) ! { dg-error "Allocate-object at" }
36 ! These should not fail the check for duplicate alloc-objects.
37 allocate(f(1)%c(2), f(2)%d(2))
38 allocate(e
%c(2), e
%d(2))