public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug lto/46796] New: debug info missing builtin type names on darwin
@ 2010-12-03 23:33 mrs at gcc dot gnu.org
  2010-12-03 23:42 ` [Bug lto/46796] " rguenth at gcc dot gnu.org
                   ` (10 more replies)
  0 siblings, 11 replies; 12+ messages in thread
From: mrs at gcc dot gnu.org @ 2010-12-03 23:33 UTC (permalink / raw)
  To: gcc-bugs

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__.


^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2011-12-20  9:50 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-12-03 23:33 [Bug lto/46796] New: debug info missing builtin type names on darwin mrs at gcc dot gnu.org
2010-12-03 23:42 ` [Bug lto/46796] " rguenth at gcc dot gnu.org
2010-12-03 23:45 ` mrs at gcc dot gnu.org
2010-12-03 23:51 ` [Bug debug/46796] debug info missing builtin type names with lto rguenth at gcc dot gnu.org
2010-12-03 23:53 ` rguenth at gcc dot gnu.org
2010-12-06 10:08 ` rguenth at gcc dot gnu.org
2010-12-06 10:10 ` rguenth at gcc dot gnu.org
2010-12-07 16:17 ` mrs at gcc dot gnu.org
2010-12-07 16:33 ` rguenther at suse dot de
2010-12-10 14:33 ` rguenth at gcc dot gnu.org
2011-12-20  9:50 ` rguenth at gcc dot gnu.org
2011-12-20 10:21 ` rguenth at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).