This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug debug/47966] GCC 3.4.6 and 4.4.3 generate wrong stabs debugging information for static file or function scope variables explicitly initialized with 0.
- From: "jonitis at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 4 Mar 2011 14:55:58 +0000
- Subject: [Bug debug/47966] GCC 3.4.6 and 4.4.3 generate wrong stabs debugging information for static file or function scope variables explicitly initialized with 0.
- Auto-submitted: auto-generated
- References: <bug-47966-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47966
--- Comment #10 from Dainis Jonitis <jonitis at gmail dot com> 2011-03-04 14:55:56 UTC ---
Actually the same problem is with function scope static variables.
int
main(int argc, char *argv[])
{
static int fvar1;
static int fvar2 = 0;
static int fvar3 = 1;
return 0;
}
0804a01c l O .data 00000004 fvar3.1259
0804a034 l O .bss 00000004 fvar2.1258
0804a038 l O .bss 00000004 fvar1.1257
29 LCSYM 0 0 0804a038 719 fvar1:V(0,1)
30 STSYM 0 0 0804a034 732 fvar2:V(0,1) // BUG: Must be LCSYM
31 STSYM 0 0 0804a01c 745 fvar3:V(0,1)