This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/34672] New: module interfacing bug
- From: "kloedej at knmi dot nl" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 4 Jan 2008 13:16:35 -0000
- Subject: [Bug fortran/34672] New: module interfacing bug
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
The attached piece of valid Fortran90 code generates a symbol error:
>gfortran -c moduletest.F90
moduletest.F90:22.19:
USE MyMod3, only: write_MyInt
1
Error: Symbol 'write_myint' referenced at (1) not found in module 'mymod3'
>
Note that when the line marked with "mark" is commented out the error
disappears! This seems a bug to me in gfortran.
The code works just fine for the 3 other fortran compilers that I have
installed (ifort, pgf90, g95), and also works fine with my previous test
version of gfortran (version of 20071024), but the current version 20080103
shows this bug.
Best regards,
Jos de kloe
-----
The following code demonstrates this behaviour:
MODULE MyMod1
integer, parameter :: i2_ = Selected_Int_Kind(4)
END Module MyMod1
module MyMod2
INTERFACE write_int
module procedure write_int_local
END INTERFACE
contains
subroutine write_int_local(value)
integer, intent(in) :: value
print *,value
end subroutine write_int_local
end module MyMod2
module MyMod3
USE MyMod2, only: write_MyInt => write_int
USE MyMod1, only: i2_ ! mark
end module MyMod3
module MyMod4
USE MyMod3, only: write_MyInt
!contains
! subroutine MyWrite(a)
! integer, intent(in) :: a
! call write_MyInt(a)
! end subroutine MyWrite
end module MYMOD4
--
Summary: module interfacing bug
Product: gcc
Version: 4.3.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: fortran
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: kloedej at knmi dot nl
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34672