[ros-kernel] Variable initialization bug in GCC 3.3.1
eric.kohl at t-online.de
Wed Jun 2 17:36:58 CEST 2004
I just found a bug in GCC 3.3.1.
A global variable that is initialized to zero, for example
int i = 0;
will is located in the (uninitialized) .bbs segment but should be located in
the (initialized) .data segment. A global varaible the is initialized to a
non-zero value, for example
int i = 1;
is correctly located in the .data segment. GCC 3.2.2 does not show this bug.
How about GCC 3.4.0?
Please test the attached test.c file by running 'gcc -S test.c -o test.s'
and check test.s. Both variables test0 and test1 should be located in the
This bug might explain some strange effects with FreeLoader! At least that's
where I noticed it.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 32 bytes
Desc: not available
Url : http://reactos.com:8080/pipermail/ros-kernel/attachments/20040602/302009ab/test.obj
More information about the Ros-kernel