Consider the following set of modules:
module a1 contains subroutine myRoutine end subroutine end module module a2 contains subroutine myRoutine end subroutine end module module b contains subroutine otherRoutine use a1 use a2 call myRoutine ! this is ambiguous ! end subroutine subroutine myRoutine end subroutine myRoutine ! this is not ambiguous ! end module Feeding this to gfortran gives two errors: all.f90:19.18: call myRoutine ! this is ambiguous ! 1 Error: Name 'myroutine' at (1) is an ambiguous reference to 'myroutine' from module 'a1' all.f90:23.52: end subroutine myRoutine ! this is not ambiguous ! 1 Error: Name 'myroutine' at (1) is an ambiguous reference to 'myroutine' from module 'a1' This first error is ok, the second is bogus. Same for all gfortran versions I tried (4.3.3, 4.4.0 and trunk). -- Summary: Bogus error: ambiguous reference Product: gcc Version: 4.5.0 Status: UNCONFIRMED Keywords: rejects-valid Severity: normal Priority: P3 Component: fortran AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: janus at gcc dot gnu dot org GCC host triplet: x86_64-unknown-linux-gnu http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39930