This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
-fzero-initialized-in-bss
- From: Michael LeBlanc <leblanc at skycomputers dot com>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 5 May 2004 15:59:02 -0400
- Subject: -fzero-initialized-in-bss
We're having some obscure failures with code containing things like
static struct something *ptr = 0;
The variable ptr is placed in .bss (.sbss with -Os) and allocated via
.zero. Running the program under gdb shows the value as -1. If I
recompile with -fno-zero-initialized-in-bss, it goes to .data, the
value appears as 0, and the program runs as expected.
I apologize in advance if this issue has already been addressed. I
have not crawled through all the archives.