Hi,
this is the failure of the LTO bootstrap with profile-directed optimization
when compiling gnat1 with debug info. The issue is that flush_limbo_die_list
doesn't actually fully flush the limbo list because it calls get_context_die,
which calls force_decl_die, which can put new DIEs on the limbo list in LTO
mode when nested functions are put in a different partition than that of their
parent function.
Richard, this is the version of the patch that you said you would approve.
Tested on x86_64-suse-linux, is it OK for GCC 6 or must it wait until GCC 7?
2016-03-15 Eric Botcazou <ebotca...@adacore.com>
PR bootstrap/69513
* dwarf2out.c (flush_limbo_die_list): Really flush the limbo list.
--
Eric Botcazou
Index: dwarf2out.c
===================================================================
--- dwarf2out.c (revision 234171)
+++ dwarf2out.c (working copy)
@@ -27281,12 +27281,15 @@ optimize_location_lists (dw_die_ref die)
static void
flush_limbo_die_list (void)
{
- limbo_die_node *node, *next_node;
+ limbo_die_node *node;
- for (node = limbo_die_list; node; node = next_node)
+ /* get_context_die calls force_decl_die, which can put new DIEs on the
+ limbo list in LTO mode when nested functions are put in a different
+ partition than that of their parent function. */
+ while ((node = limbo_die_list))
{
dw_die_ref die = node->die;
- next_node = node->next;
+ limbo_die_list = node->next;
if (die->die_parent == NULL)
{
@@ -27324,8 +27327,6 @@ flush_limbo_die_list (void)
}
}
}
-
- limbo_die_list = NULL;
}
/* Output stuff that dwarf requires at the end of every file,