This is the mail archive of the
mailing list for the GCC project.
- From: Michael LeBlanc <leblanc at skycomputers dot com>
- To: gcc at gcc dot gnu dot org
- Date: Thu, 6 May 2004 06:52:00 -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. Our compiler configuration
is shown below. Our platform is a PowerPC 745x running Yellow Dog
Linux 3.0. Thanks.
SKY Computers, Inc.
Reading specs from /usr/mike/lib/gcc-lib/ppc-sky-linux/3.3/specs
Configured with: ../gnu-tool-chain/gcc/configure --with-cpu=7450
--enable-shared --enable-threads=posix --enable-languages=c,c++
--with-system-zlib --enable-__cxa_atexit --host=ppc-sky-linux
--prefix=/usr/mike : (reconfigured)
Thread model: posix
gcc version 3.3