aboutsummaryrefslogtreecommitdiff
path: root/gcc/cgraphunit.c
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2008-01-30 00:21:24 +0100
committerJakub Jelinek <jakub@gcc.gnu.org>2008-01-30 00:21:24 +0100
commit2bafad93f704c2909c8b5988a0b0e98b57993617 (patch)
treee67112931bc0870ff4c9d06efcb44ad08a4da4f2 /gcc/cgraphunit.c
parent1033ffa8b312170efeeef1f3e4f58ced8075eaea (diff)
downloadgcc-2bafad93f704c2909c8b5988a0b0e98b57993617.zip
gcc-2bafad93f704c2909c8b5988a0b0e98b57993617.tar.gz
gcc-2bafad93f704c2909c8b5988a0b0e98b57993617.tar.bz2
re PR middle-end/34969 (ICE with -fipa-cp -ffast-math)
PR middle-end/34969 * cgraph.h (cgraph_update_edges_for_call_stmt): New prototype. * cgraph.c (cgraph_update_edges_for_call_stmt): New function. * tree-inline.c (fold_marked_statements): Call cgraph_update_edges_for_call_stmt if folding a call statement. * cgraphunit.c (verify_cgraph_node): Set cfun to this_cfun for debug_generic_stmt calls, reset it back afterwards. * gcc.dg/pr34969.c: New test. From-SVN: r131946
Diffstat (limited to 'gcc/cgraphunit.c')
-rw-r--r--gcc/cgraphunit.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/gcc/cgraphunit.c b/gcc/cgraphunit.c
index 07b597f..0d6a9fe 100644
--- a/gcc/cgraphunit.c
+++ b/gcc/cgraphunit.c
@@ -658,6 +658,7 @@ verify_cgraph_node (struct cgraph_node *node)
struct cgraph_edge *e;
struct cgraph_node *main_clone;
struct function *this_cfun = DECL_STRUCT_FUNCTION (node->decl);
+ struct function *saved_cfun = cfun;
basic_block this_block;
block_stmt_iterator bsi;
bool error_found = false;
@@ -666,6 +667,8 @@ verify_cgraph_node (struct cgraph_node *node)
return;
timevar_push (TV_CGRAPH_VERIFY);
+ /* debug_generic_stmt needs correct cfun */
+ set_cfun (this_cfun);
for (e = node->callees; e; e = e->next_callee)
if (e->aux)
{
@@ -808,6 +811,7 @@ verify_cgraph_node (struct cgraph_node *node)
dump_cgraph_node (stderr, node);
internal_error ("verify_cgraph_node failed");
}
+ set_cfun (saved_cfun);
timevar_pop (TV_CGRAPH_VERIFY);
}