tree-iterator.c (append_to_statement_list_1): Handle case that *list_p is not a STMT_LIST.

2012-04-17  Tom de Vries  <tom@codesourcery.com>

	* tree-iterator.c (append_to_statement_list_1): Handle case that *list_p
	is not a STMT_LIST.

From-SVN: r186545
This commit is contained in:
Tom de Vries 2012-04-17 18:28:34 +00:00 committed by Tom de Vries
parent 6c381d9d1c
commit a60596b8e5
2 changed files with 12 additions and 0 deletions

View File

@ -1,3 +1,8 @@
2012-04-17 Tom de Vries <tom@codesourcery.com>
* tree-iterator.c (append_to_statement_list_1): Handle case that *list_p
is not a STMT_LIST.
2012-04-17 Uros Bizjak <ubizjak@gmail.com>
PR target/53020

View File

@ -74,6 +74,13 @@ append_to_statement_list_1 (tree t, tree *list_p)
}
*list_p = list = alloc_stmt_list ();
}
else if (TREE_CODE (list) != STATEMENT_LIST)
{
tree first = list;
*list_p = list = alloc_stmt_list ();
i = tsi_last (list);
tsi_link_after (&i, first, TSI_CONTINUE_LINKING);
}
i = tsi_last (list);
tsi_link_after (&i, t, TSI_CONTINUE_LINKING);