aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-cfg.c
diff options
context:
space:
mode:
authorRichard Henderson <rth@redhat.com>2004-06-18 22:39:14 -0700
committerRichard Henderson <rth@gcc.gnu.org>2004-06-18 22:39:14 -0700
commitff98621c682005e2a224f62c1aa5028353a5357e (patch)
tree5791e7f8af3ac3bb999dd5a105aafb41d29af09e /gcc/tree-cfg.c
parent048d99365055be4021508378e90a90987df38283 (diff)
downloadgcc-ff98621c682005e2a224f62c1aa5028353a5357e.zip
gcc-ff98621c682005e2a224f62c1aa5028353a5357e.tar.gz
gcc-ff98621c682005e2a224f62c1aa5028353a5357e.tar.bz2
re PR c++/16036 (Spurious "may be used uninitialized in this function" warning)
PR c++/16036 * gimple-low.c (lower_function_body): Generate return statement for fall off the end of the function here ... * tree-cfg.c (make_edges): ... instead of here. * gimplify.c (gimplify_return_expr): Mark return temp TREE_NO_WARNING. From-SVN: r83382
Diffstat (limited to 'gcc/tree-cfg.c')
-rw-r--r--gcc/tree-cfg.c28
1 files changed, 0 insertions, 28 deletions
diff --git a/gcc/tree-cfg.c b/gcc/tree-cfg.c
index 25d5b06..1fad3da 100644
--- a/gcc/tree-cfg.c
+++ b/gcc/tree-cfg.c
@@ -418,7 +418,6 @@ static void
make_edges (void)
{
basic_block bb;
- edge e;
/* Create an edge from entry to the first block with executable
statements in it. */
@@ -447,33 +446,6 @@ make_edges (void)
make_edge (bb, bb->next_bb, EDGE_FALLTHRU);
}
- /* If there is a fallthru edge to exit out of the last block, transform it
- to a return statement. */
- for (e = EXIT_BLOCK_PTR->prev_bb->succ; e; e = e->succ_next)
- if (e->flags & EDGE_FALLTHRU)
- break;
-
- if (e && e->dest == EXIT_BLOCK_PTR)
- {
- block_stmt_iterator bsi;
- basic_block ret_bb = EXIT_BLOCK_PTR->prev_bb;
- tree x;
-
- /* If E->SRC ends with a call that has an abnormal edge (for EH or
- nonlocal goto), then we will need to split the edge to insert
- an explicit return statement. */
- if (e != ret_bb->succ || e->succ_next)
- {
- ret_bb = split_edge (e);
- e = ret_bb->succ;
- }
- e->flags &= ~EDGE_FALLTHRU;
-
- x = build (RETURN_EXPR, void_type_node, NULL_TREE);
- bsi = bsi_last (ret_bb);
- bsi_insert_after (&bsi, x, BSI_NEW_STMT);
- }
-
/* We do not care about fake edges, so remove any that the CFG
builder inserted for completeness. */
remove_fake_edges ();