The attached code is not compiled correctly; gfortran accepts the subroutine but not the function. NAG 5.2 compiles cleanly.
[sfili...@localhost bug4]$ gfortran -v Using built-in specs. COLLECT_GCC=gfortran COLLECT_LTO_WRAPPER=/home/local/gnu45/bin/../libexec/gcc/i686-pc-linux-gnu/4.5.0/lto-wrapper Target: i686-pc-linux-gnu Configured with: ../gcc/configure --prefix=/usr/local/gnu45 --enable-languages=c,c++,fortran Thread model: posix gcc version 4.5.0 20091009 (experimental) (GCC) [sfili...@localhost bug4]$ gfortran -c test-der4.f03 test-der4.f03:45.10: res = a%a%getit() 1 Error: Function 'getit' at (1) cannot be called recursively, as it is not RECURSIVE -- Summary: [OOP] Type-bound procedures refused Product: gcc Version: 4.5.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: sfilippone at uniroma2 dot it GCC build triplet: i686-pc-linux-gnu GCC host triplet: i686-pc-linux-gnu GCC target triplet: i686-pc-linux-gnu http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41648