2 ! { dg-options "-Wreturn-type" }
4 ! PR fortran/31463 - inconsistent warnings if function return value is not set
5 ! PR fortran/33950 - Warning missing for function result not set
6 ! PR fortran/34296 - Intent(out) and character functions with RESULT: Value-not-set warning
8 FUNCTION f1() ! { dg-warning "not set" }
12 FUNCTION f2() ! { dg-warning "not set" }
13 REAL, DIMENSION(1) :: f2
16 FUNCTION f3() ! { dg-warning "not set" }
20 FUNCTION f4() ! { dg-warning "not set" }
21 REAL, DIMENSION(:), POINTER :: f4
24 FUNCTION f5() ! { dg-warning "not set" }
25 REAL, DIMENSION(:), ALLOCATABLE
:: f5
28 FUNCTION f6() ! { dg-warning "not set" }
34 FUNCTION g1() RESULT(h
) ! { dg-warning "not set" }
38 FUNCTION g2() RESULT(h
) ! { dg-warning "not set" }
39 REAL, DIMENSION(1) :: h
42 FUNCTION g3() RESULT(h
) ! { dg-warning "not set" }
46 FUNCTION g4() RESULT(h
) ! { dg-warning "not set" }
47 REAL, DIMENSION(:), POINTER :: h
50 FUNCTION g5() RESULT(h
) ! { dg-warning "not set" }
51 REAL, DIMENSION(:), ALLOCATABLE
:: h
54 FUNCTION g6() RESULT(h
) ! { dg-warning "not set" }