This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/12073] New: Block Data initialisation only from first shared library of a common block
- From: "s dot blackett at auckland dot ac dot nz" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 27 Aug 2003 04:19:24 -0000
- Subject: [Bug fortran/12073] New: Block Data initialisation only from first shared library of a common block
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12073
Summary: Block Data initialisation only from first shared library
of a common block
Product: gcc
Version: 3.2.2
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: fortran
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: s dot blackett at auckland dot ac dot nz
CC: gcc-bugs at gcc dot gnu dot org
GCC host triplet: i586-mandrake-linux-gnu
When several shared libraries using the same common block are linked together
then only block data initialisation from the first library is used. The link
changes the block data symbol to .data in each case and the final link seems to
just use the first one.
The enclosed tar builds three executables, test_block_data which has the BLOCK
DATA in the first library and so succeeds, test_block_data2 which has the same
libraries linked in the reverse order and fails and test_block_data3 which links
the objects without the libraries and so succeeds.