This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/16485] New: Private subroutines from different modules collide during linking.
- From: "olchansk at panix dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 12 Jul 2004 00:45:15 -0000
- Subject: [Bug fortran/16485] New: Private subroutines from different modules collide during linking.
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
gfortran version "gcc version 3.5.0 20040710 (experimental)" generates incorrect
names for private functions inside modules, causing link-time collisions between
same-named private functions from different modules: (this problem prevents this
example from even assembling):
[olchansk@tw15 gfortran_test]$ cat test_ldcollide.f90
module foo
private
contains
subroutine sub
end subroutine sub
end module foo
module bar
private
contains
subroutine sub
end subroutine sub
end module bar
[olchansk@tw15 gfortran_test]$ make test_ldcollide.o
/triumfcs/trshare/olchansk/gcc-tree-ssa/install/bin/gfortran -x f95 -c -o
test_ldcollide.o -O2 -g -Wall -Waliasing -Wline-truncation -Wsurprising
-Wunused-labels -fPIC -ffixed-line-length-132 test_ldcollide.f90
/tmp/ccAzTdiq.s: Assembler messages:
/tmp/ccAzTdiq.s:30: Error: symbol `sub_' is already defined
make: *** [test_ldcollide.o] Error 1
K.O.
--
Summary: Private subroutines from different modules collide
during linking.
Product: gcc
Version: 3.5.0
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: fortran
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: olchansk at panix dot com
CC: gcc-bugs at gcc dot gnu dot org
GCC build triplet: i686-pc-linux-gnu
GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i686-pc-linux-gnu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16485