The following code does not give a warning: CHARACTER(2) FUNCTION ctbgt() RESULT(ctab) END function ctbgt
Only if one removes either the RESULT or changes CHARACTER in, e.g., INTEGER a warning is shown. w/ RESULT and INTEGER: warning: Function return value not set w/o RESULT: warning: Function does not return a value * * * Similarly for INTENT(OUT) arguments of procedures: SUBROUTINE ctbgt(ctab) INTEGER, intent(out) :: ctab END SUBROUTINE ctbgt -- Summary: Intent(out) and character functions with RESULT: Value- not-set warning Product: gcc Version: 4.3.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=34296