aboutsummaryrefslogtreecommitdiff
path: root/gcc/omp-low.c
diff options
context:
space:
mode:
authorMartin Jambor <mjambor@suse.cz>2011-04-12 11:12:58 +0200
committerMartin Jambor <jamborm@gcc.gnu.org>2011-04-12 11:12:58 +0200
commitfe660d7bfe8ae31c03f500af99c1a614438d0198 (patch)
tree4f92a1e1c4927ceefc0819510aeb42d32a9ed51a /gcc/omp-low.c
parent237526dd7d236748f0f9cfba83e538bd0a571201 (diff)
downloadgcc-fe660d7bfe8ae31c03f500af99c1a614438d0198.zip
gcc-fe660d7bfe8ae31c03f500af99c1a614438d0198.tar.gz
gcc-fe660d7bfe8ae31c03f500af99c1a614438d0198.tar.bz2
tree-inline.c (tree_function_versioning): Call cgraph_get_node instead of cgraph_node and assert it does not return NULL.
2011-04-12 Martin Jambor <mjambor@suse.cz> * tree-inline.c (tree_function_versioning): Call cgraph_get_node instead of cgraph_node and assert it does not return NULL. * lto-streamer-in.c (lto_read_body): Likewise. * omp-low.c (new_omp_context): Likewise. (create_task_copyfn): Likewise. * tree-emutls.c (lower_emutls_function_body): Likewise. * matrix-reorg.c (transform_allocation_sites): Likewise. From-SVN: r172306
Diffstat (limited to 'gcc/omp-low.c')
-rw-r--r--gcc/omp-low.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/gcc/omp-low.c b/gcc/omp-low.c
index c3f2178..8b2412c 100644
--- a/gcc/omp-low.c
+++ b/gcc/omp-low.c
@@ -1209,7 +1209,8 @@ new_omp_context (gimple stmt, omp_context *outer_ctx)
{
ctx->cb.src_fn = current_function_decl;
ctx->cb.dst_fn = current_function_decl;
- ctx->cb.src_node = cgraph_node (current_function_decl);
+ ctx->cb.src_node = cgraph_get_node (current_function_decl);
+ gcc_checking_assert (ctx->cb.src_node);
ctx->cb.dst_node = ctx->cb.src_node;
ctx->cb.src_cfun = cfun;
ctx->cb.copy_decl = omp_copy_decl;
@@ -6263,7 +6264,8 @@ create_task_copyfn (gimple task_stmt, omp_context *ctx)
memset (&tcctx, '\0', sizeof (tcctx));
tcctx.cb.src_fn = ctx->cb.src_fn;
tcctx.cb.dst_fn = child_fn;
- tcctx.cb.src_node = cgraph_node (tcctx.cb.src_fn);
+ tcctx.cb.src_node = cgraph_get_node (tcctx.cb.src_fn);
+ gcc_checking_assert (tcctx.cb.src_node);
tcctx.cb.dst_node = tcctx.cb.src_node;
tcctx.cb.src_cfun = ctx->cb.src_cfun;
tcctx.cb.copy_decl = task_copyfn_copy_decl;