diff options
author | Jakub Jelinek <jakub@redhat.com> | 2008-06-20 04:18:07 +0200 |
---|---|---|
committer | Jakub Jelinek <jakub@gcc.gnu.org> | 2008-06-20 04:18:07 +0200 |
commit | 2368a460c8d49c4d9aa1aab2b79d6727d19f5b2c (patch) | |
tree | f28feb4e7a51182a0bf7d4ca97a21a4def2af406 /gcc/cgraphbuild.c | |
parent | c598874b4bc7d816b81b8f839f75029122e4fe92 (diff) | |
download | gcc-2368a460c8d49c4d9aa1aab2b79d6727d19f5b2c.zip gcc-2368a460c8d49c4d9aa1aab2b79d6727d19f5b2c.tar.gz gcc-2368a460c8d49c4d9aa1aab2b79d6727d19f5b2c.tar.bz2 |
re PR c++/36523 (OpenMP task construct fails to instantiate copy constructor)
PR c++/36523
* cgraphunit.c (cgraph_process_new_functions): Don't clear
node->needed and node->reachable.
* cgraphbuild.c (record_reference): Handle OMP_PARALLEL and OMP_TASK.
* omp-low.c (delete_omp_context): Call finalize_task_copyfn.
(expand_task_call): Don't call expand_task_copyfn.
(expand_task_copyfn): Renamed to...
(finalize_task_copyfn): ... this.
* testsuite/libgomp.c++/task-7.C: New function.
From-SVN: r136977
Diffstat (limited to 'gcc/cgraphbuild.c')
-rw-r--r-- | gcc/cgraphbuild.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/gcc/cgraphbuild.c b/gcc/cgraphbuild.c index e37ca86..19e1983 100644 --- a/gcc/cgraphbuild.c +++ b/gcc/cgraphbuild.c @@ -62,6 +62,24 @@ record_reference (tree *tp, int *walk_subtrees, void *data ATTRIBUTE_UNUSED) } break; + case OMP_PARALLEL: + if (flag_unit_at_a_time) + { + if (OMP_PARALLEL_FN (*tp)) + cgraph_mark_needed_node (cgraph_node (OMP_PARALLEL_FN (*tp))); + } + break; + + case OMP_TASK: + if (flag_unit_at_a_time) + { + if (OMP_TASK_FN (*tp)) + cgraph_mark_needed_node (cgraph_node (OMP_TASK_FN (*tp))); + if (OMP_TASK_COPYFN (*tp)) + cgraph_mark_needed_node (cgraph_node (OMP_TASK_COPYFN (*tp))); + } + break; + default: /* Save some cycles by not walking types and declaration as we won't find anything useful there anyway. */ |