This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/51900] [4.6/4.7 Regression] const variable initialization always zero
- From: "ktietz at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 20 Jan 2012 01:36:42 +0000
- Subject: [Bug target/51900] [4.6/4.7 Regression] const variable initialization always zero
- Auto-submitted: auto-generated
- References: <bug-51900-4@http.gcc.gnu.org/bugzilla/>
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.