Hi, the following legal code fails to compile with gfortran build 20070713:
module gfcbug68 implicit none public :: print contains subroutine foo (i) integer, intent(in) :: i print *, i end subroutine foo subroutine print (m) integer, intent(in) :: m end subroutine print end module gfcbug68 I get: gfcbug68.f90:13.18: subroutine print (m) 1 Error: VARIABLE attribute of 'print' conflicts with PROCEDURE attribute at (1) gfcbug68.f90:14.28: integer, intent(in) :: m 1 Error: Unexpected data declaration statement in CONTAINS section at (1) gfcbug68.f90:15.5: end subroutine print 1 Error: Expecting END MODULE statement at (1) gfcbug68.f90:3.17: public :: print 1 Error: Symbol 'print' at (1) has no IMPLICIT type Reversing the subroutines removes (or hides) the problem. Cheers, -ha -- Summary: [4.3 regression] Error defining subroutine named PRINT Product: gcc Version: 4.3.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: anlauf at gmx dot de GCC host triplet: i686-pc-linux-gnu http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32760