$> cat locus.f90
MODULE m
PUBLIC :: s
CONTAINS
SUBROUTINE s()
END SUBROUTINE
SUBROUTINE s()
END SUBROUTINE
END MODULE
$> gfortran-svn locus.f90
locus.f90:6.14:
SUBROUTINE s()
1
locus.f90:2.13:
PUBLIC :: s
2
Error: Procedure 's' at (1) is already defined at (2)
Without "PUBLIC :: s", the correct message is printed:
$> gfortran-svn locus.f90
locus.f90:6.14:
SUBROUTINE s()
1
locus.f90:4.14:
SUBROUTINE s()
2
Error: Procedure 's' at (1) is already defined at (2)
--
Summary: wrong locus in error message
Product: gcc
Version: 4.5.0
Status: UNCONFIRMED
Keywords: diagnostic
Severity: normal
Priority: P3
Component: fortran
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: dfranke at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39991