[Bug lto/46796] New: debug info missing builtin type names on darwin
mrs at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Fri Dec 3 23:33:00 GMT 2010
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46796
Summary: debug info missing builtin type names on darwin
Product: gcc
Version: 4.2.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: lto
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: mrs@gcc.gnu.org
int i;
doesn't preserve the name "int" on the type under lto. Consider:
$ cat t.c
volatile float a1, a2;
void * volatile vp;
void f(int i) {
a1 = i;
a1 = a2;
}
int main() {
f(12);
return 0;
}
$ ./xgcc -B./ -flto t.c -g -v -Wl,-debug -save-temps
$ grep int cc*.s
$ ./xgcc -B./ -S t.c -g -o t-normal.s
$ grep int t-normal.s
.ascii "int\0"
because of this, this code:
/* This probably indicates a bug. */
else if (mod_type_die && mod_type_die->die_tag == DW_TAG_base_type)
add_name_attribute (mod_type_die, "__unknown__");
in dwarf2out.c adds a name __unknown__ to most things, and under gdb, we get:
(gdb) start
(gdb) step
(gdb) ptype i
type = __unknown__
instead of:
(gdb) start
(gdb) step
(gdb) ptype i
type = int
when we compile without -flto. If the name was preserved, then the type would
have the right name, instead of __unknown__.
More information about the Gcc-bugs
mailing list