2 ! { dg-options "-std=f95" }
6 ! Check for a special case when the return-type of a function is given outside
7 ! its "body" and contains symbols defined inside.
14 CHARACTER(len
=x
) FUNCTION test1 (x
) ! { dg-error "of INTEGER" }
16 INTEGER :: x
! { dg-error "already has basic type" }
20 CHARACTER(len
=x
) FUNCTION test2 (x
) ! { dg-error "of INTEGER" }
27 CHARACTER(len
=i
) FUNCTION test3 (i
)
28 ! i is IMPLICIT INTEGER by default
32 CHARACTER(len
=g
) FUNCTION test4 (g
) ! { dg-error "of INTEGER" }
33 ! g is REAL, unless declared INTEGER.
37 ! Test an empty function works, too.
38 INTEGER FUNCTION test5 ()