http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59662
Bug ID: 59662 Summary: [OOP] TBP subroutine call rejected in contained subroutine Product: gcc Version: 4.9.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran Assignee: unassigned at gcc dot gnu.org Reporter: sfilippone at uniroma2 dot it Created attachment 31565 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=31565&action=edit testcase The attached code fails with current trunk with what appears to be an overzealous check. The code compiles and works fine with 4.8.1. Commenting the BIND(C) routine call or moving the foobar subroutine outside of foo masks the problem. ----------------------------------------------- [sfilippo@jacobi bug36]$ gfortran -v Using built-in specs. COLLECT_GCC=gfortran COLLECT_LTO_WRAPPER=/usr/local/gnu/4.9/libexec/gcc/x86_64-unknown-linux-gnu/4.9.0/lto-wrapper Target: x86_64-unknown-linux-gnu Configured with: ../gcc/configure --prefix=/usr/local/gnu/4.9 --enable-languages=c,c++,fortran --with-gmp=/home/travel/GNUBUILD/gmp --with-mpfr=/home/travel/GNUBUILD/mpfr --with-mpc=/home/travel/GNUBUILD/mpc --with-cloog=/home/travel/GNUBUILD/cloog : (reconfigured) ../gcc/configure --prefix=/usr/local/gnu/4.9 --with-gmp=/home/travel/GNUBUILD/gmp --with-mpfr=/home/travel/GNUBUILD/mpfr --with-mpc=/home/travel/GNUBUILD/mpc --with-cloog=/home/travel/GNUBUILD/cloog --enable-languages=c,c++,fortran,lto --no-create --no-recursion : (reconfigured) ../gcc/configure --prefix=/usr/local/gnu/4.9 --with-gmp=/home/travel/GNUBUILD/gmp --with-mpfr=/home/travel/GNUBUILD/mpfr --with-mpc=/home/travel/GNUBUILD/mpc --with-cloog=/home/travel/GNUBUILD/cloog --enable-languages=c,c++,fortran,lto --no-create --no-recursion Thread model: posix gcc version 4.9.0 20140102 (experimental) (GCC) [sfilippo@jacobi bug36]$ gfortran -c testcase.f90 testcase.f90:59.22: call a%mv_to(acsc) 1 Error: 'mv_to_base' at (1) is not a function