re PR middle-end/69513 (LTO bootstrap fails with bootstrap-profiled during linking...
authorEric Botcazou <ebotcazou@adacore.com>
Tue, 15 Mar 2016 17:55:39 +0000 (17:55 +0000)
committerEric Botcazou <ebotcazou@gcc.gnu.org>
Tue, 15 Mar 2016 17:55:39 +0000 (17:55 +0000)
PR bootstrap/69513
* dwarf2out.c (flush_limbo_die_list): Really flush the limbo list.

From-SVN: r234226

gcc/ChangeLog
gcc/dwarf2out.c

index f88750a65a138273bbd738a30479b7048e04835e..8909a99e08b7776371523d74b851a82d58ed00aa 100644 (file)
@@ -1,3 +1,8 @@
+2016-03-15  Eric Botcazou  <ebotcazou@adacore.com>
+
+       PR bootstrap/69513
+       * dwarf2out.c (flush_limbo_die_list): Really flush the limbo list.
+
 2016-03-15  Senthil Kumar Selvaraj  <senthil_kumar.selvaraj@atmel.com>
 
        * config/avr/avr.md (rotl<mode>3): Set mode for operand 2.
index 6d5e3f540f5a05d02b203524ba402e54e1df9366..61bf267d6ec5350ae2bd049f5e5dd30c4133b71c 100644 (file)
@@ -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,