This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug target/51900] [4.6/4.7 Regression] const variable initialization always zero


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51900

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jakub at gcc dot gnu.org

--- Comment #9 from Jakub Jelinek <jakub at gcc dot gnu.org> 2012-01-20 07:33:36 UTC ---
Dunno about PE-COFF, but at least in ELF merging of .data (or .rodata) and
common symbols works by keeping the non-common symbol and it is the behavior
that GCC expects with -fcommon. If the PE-COFF linker handles it the same, then
if you can't use default_binds_local_p, you should at least copy over the
common symbol handling from it.
int i = 5;
in one file and
int i;
in another one with -fcommon just provides the int i = 5; definition and
int i; in two files provides int i = 0; definition.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]