gcc/testsuite/gfortran.dg/warn_function_without_result_2.f90
raw| 1 | ! { dg-do compile } |
| 2 | ! { dg-options "-Wall" } |
| 3 | ! |
| 4 | ! PR fortran/50923 |
| 5 | ! |
| 6 | module m |
| 7 | contains |
| 8 | integer pure function f() ! { dg-warning "Return value of function 'f' at .1. not set" } |
| 9 | end function f |
| 10 | integer pure function g() result(h) ! { dg-warning "Return value 'h' of function 'g' declared at .1. not set" } |
| 11 | end function g |
| 12 | integer pure function i() |
| 13 | i = 7 |
| 14 | end function i |
| 15 | integer pure function j() result(k) |
| 16 | k = 8 |
| 17 | end function j |
| 18 | end module m |