2 ! { dg-options "-std=f95" }
4 ! Test for a special case of the used-before-typed errors, when the symbols
5 ! not-yet-typed are indices.
7 SUBROUTINE test (n
, arr1
, m
, arr2
) ! { dg-error "has no IMPLICIT type" }
12 INTEGER :: arr1(SIZE (myarr(1:n
))) ! { dg-error "'n' is used before" }
15 INTEGER :: arr2(LEN ("hello"(1:m
))) ! { dg-error "'m' is used before" }
18 WRITE (*,*) SIZE (arr1
)
19 WRITE (*,*) SIZE (arr2
)
24 INTEGER :: arr1(42), arr2(42)
25 CALL test (3, arr1
, 2, arr2
) ! { dg-warning "Type mismatch in argument" }