+2011-05-02 Jason Merrill <jason@redhat.com>
+
+ PR c++/40975
+ * tree-inline.c (copy_tree_r): Handle STATEMENT_LIST.
+
2011-05-02 Simon Martin <simartin@users.sourceforge.net>
PR c/35445
CONSTRUCTOR_ELTS (*tp));
*tp = new_tree;
}
+ else if (code == STATEMENT_LIST)
+ {
+ /* We used to just abort on STATEMENT_LIST, but we can run into them
+ with statement-expressions (c++/40975). */
+ tree new_list = alloc_stmt_list ();
+ tree_stmt_iterator i = tsi_start (*tp);
+ tree_stmt_iterator j = tsi_last (new_list);
+ for (; !tsi_end_p (i); tsi_next (&i))
+ {
+ tree stmt = tsi_stmt (i);
+ tsi_link_after (&j, stmt, TSI_CONTINUE_LINKING);
+ }
+ *tp = new_list;
+ }
else if (TREE_CODE_CLASS (code) == tcc_type)
*walk_subtrees = 0;
else if (TREE_CODE_CLASS (code) == tcc_declaration)
*walk_subtrees = 0;
else if (TREE_CODE_CLASS (code) == tcc_constant)
*walk_subtrees = 0;
- else
- gcc_assert (code != STATEMENT_LIST);
return NULL_TREE;
}