aboutsummaryrefslogtreecommitdiff
path: root/gcc/omp-low.c
diff options
context:
space:
mode:
authorMartin Jambor <mjambor@suse.cz>2011-04-12 09:12:58 +0000
committerMartin Jambor <mjambor@suse.cz>2011-04-12 09:12:58 +0000
commit489c56a6e85b92960c1442d590434981fa655e9c (patch)
tree4f92a1e1c4927ceefc0819510aeb42d32a9ed51a /gcc/omp-low.c
parenta4b49141475163be4e522179893759926ad570f7 (diff)
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. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@172306 138bc75d-0d04-0410-961f-82ee72b054a4
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 c3f217818bc..8b2412cca1a 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;