re PR c++/48999 (FAIL: g++.dg/torture/20090706-1.C due to an ICE on *-*-darwin*)
authorJason Merrill <jason@redhat.com>
Mon, 16 May 2011 14:30:30 +0000 (10:30 -0400)
committerJason Merrill <jason@gcc.gnu.org>
Mon, 16 May 2011 14:30:30 +0000 (10:30 -0400)
PR c++/48999
* tree-inline.c (copy_statement_list): Put back recursion.

From-SVN: r173793

gcc/ChangeLog
gcc/tree-inline.c

index 8ba223fe60fcc708266dcef72b532a11cd89fecc..a46fe6db2db8151b933c87407369384305740878 100644 (file)
@@ -1,3 +1,8 @@
+2011-05-16  Jason Merrill  <jason@redhat.com>
+
+       PR c++/48999
+       * tree-inline.c (copy_statement_list): Put back recursion.
+
 2011-05-16  Georg-Johann Lay  <avr@gjlay.de>
 
        PR target/27663
index fc8c88fea9b6997605f0f068ff085a5a5395d930..8ac3fed20dd87fb48919a86417975a29bdf1862d 100644 (file)
@@ -662,6 +662,11 @@ copy_statement_list (tree *tp)
   for (; !tsi_end_p (oi); tsi_next (&oi))
     {
       tree stmt = tsi_stmt (oi);
+      if (TREE_CODE (stmt) == STATEMENT_LIST)
+       /* This copy is not redundant; tsi_link_after will smash this
+          STATEMENT_LIST into the end of the one we're building, and we
+          don't want to do that with the original.  */
+       copy_statement_list (&stmt);
       tsi_link_after (&ni, stmt, TSI_CONTINUE_LINKING);
     }
 }