[Bug bootstrap/66448] [6 Regression] Bootstrap fails on darwin after r224161

aldyh at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Mon Jun 8 22:02:00 GMT 2015


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66448

--- Comment #8 from Aldy Hernandez <aldyh at gcc dot gnu.org> ---
Created attachment 35718
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=35718&action=edit
Tentative patch for issue #3

Regarding the Darwin ld64 warnings, I found one instance of a local static DIE
with two DW_AT_location's during x86-64 Linux bootstrap.  It was for something
like this:

void foo()
{
static const char msg[] = "asdf";
}

What is happening is that local statics during late dwarf are traversed twice,
once in final.c via debug_hooks->function_decl (and its subsequent local), and
once  in toplev.c as we traverse FOR_EACH_DEFINED_SYMBOL with
debug_hooks->late_global_decl.

However, the multiple DW_AT_location's never made it to the object file (on
Linux anyhow) because resolve_addr() removed one of the duplicates.

I wonder if the attached patch catches anything else in Darwin, or if it
eliminates the warning altogether.

Iain, could you try this and see if it either ICEs, or if the warnings are
removed?



More information about the Gcc-bugs mailing list