Fix flags for edges from/to entry/exit basic blocks. W/o this patch I hit internal asserts when trying to split the edge from entry block.
Index: gcc/cgraphunit.c =================================================================== --- gcc/cgraphunit.c (revision 182237) +++ gcc/cgraphunit.c (working copy) @@ -1459,8 +1459,8 @@ /* Create BB for body of the function and connect it properly. */ bb = create_basic_block (NULL, (void *) 0, ENTRY_BLOCK_PTR); - make_edge (ENTRY_BLOCK_PTR, bb, 0); - make_edge (bb, EXIT_BLOCK_PTR, 0); + make_edge (ENTRY_BLOCK_PTR, bb, EDGE_FALLTHRU); + make_edge (bb, EXIT_BLOCK_PTR, EDGE_FALLTHRU); return bb; } Index: gcc/ChangeLog =================================================================== --- gcc/ChangeLog (revision 182237) +++ gcc/ChangeLog (working copy) @@ -1,3 +1,8 @@ +2011-12-12 Dmitry Vyukov <dvyu...@google.com> + + * cgraphunit.c (init_lowered_empty_function): + Fix flags for new edges. + 2011-12-12 Torvald Riegel <trie...@redhat.com> * gimplify.c (voidify_wrapper_expr): Add default handling for -- This patch is available for review at http://codereview.appspot.com/5486043