http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53718
--- Comment #3 from janus at gcc dot gnu.org 2012-06-18 20:04:09 UTC --- (In reply to comment #2) > just as a side note: most of my bugreports come from compiling babel's > regression test suite. Babel is a language interoperability tool that (also) > generates bindings for Fortran 2003. It's free (LGPL) and it might be a very > good testcase for gfortran in the future. > > https://computation.llnl.gov/casc/components/ Thanks for the pointer. Sounds interesting. Btw, here is a slightly different (but much simpler) test case, which exhibits the same problem: module m type t end type end module subroutine sub1 use m class(t), pointer :: a1 end subroutine subroutine sub2 use m class(t), pointer :: a2 end subroutine This structure is rather unusual for F03 object-oriented code, since it involves 'naked' subroutines (F77 style), which are not part of any MODULE or PROGRAM. Putting both routines into a module or program makes the error go away.