[Bug target/51900] [4.6/4.7 Regression] const variable initialization always zero
ktietz at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Fri Jan 20 02:50:00 GMT 2012
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51900
Kai Tietz <ktietz at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |INVALID
--- Comment #8 from Kai Tietz <ktietz at gcc dot gnu.org> 2012-01-20 01:36:42 UTC ---
As PE-COFF targets don't have GOT tables and ELF-shared object model, it would
be absolute incorrect to return here result of default_binds_local_p (exp)
instead of true. The function 'default_binds_local_p' is ELF-specific and is
not usable for PE-COFF targets at all.
This testcase contains double declaration of myVar. You can see this by
turning on -Wall option on compile. The cause is that in the header the
extern-keyword is missing.
This is no gcc bug. This is a binutils bug, which doesn't see that here are
two equal named symbols defined - one in data and one in comm.
I noticed that earlier by a different bug, that .comm double definitions in
.comm aren't detected on link-time. This is a binutils bug.
More information about the Gcc-bugs
mailing list