The following program is valid but with -fcheck=recursion the following error is shown:
At line 1 of file aa.f90 Fortran runtime error: Recursive call to nonrecursive procedure 'test' There might be more such cases if one digs (entry? some strange label returns of F77? ...). But we might be lucky and everything is fixed at one place. Dump: goto __return_test; __return_test:; return __result_test; is_recursive.0 = 0; integer function test() test = 5 return ! not reachable end function test program main integer :: a a = test() a = test() end program main -- Summary: False positive with -fcheck=recursion Product: gcc Version: 4.4.0 Status: UNCONFIRMED Keywords: diagnostic Severity: normal Priority: P3 Component: fortran AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: burnus at gcc dot gnu dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39577