From 2368a460c8d49c4d9aa1aab2b79d6727d19f5b2c Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Fri, 20 Jun 2008 04:18:07 +0200 Subject: 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 --- libgomp/ChangeLog | 3 +++ libgomp/testsuite/libgomp.c++/task-7.C | 18 ++++++++++++++++++ 2 files changed, 21 insertions(+) create mode 100644 libgomp/testsuite/libgomp.c++/task-7.C (limited to 'libgomp') diff --git a/libgomp/ChangeLog b/libgomp/ChangeLog index 784d59f..ed27454 100644 --- a/libgomp/ChangeLog +++ b/libgomp/ChangeLog @@ -2,6 +2,9 @@ * testsuite/libgomp.c/nqueens-1.c: New test. + PR c++/36523 + * testsuite/libgomp.c++/task-7.C: New function. + 2008-06-17 Ralf Wildenhues * configure: Regenerate. diff --git a/libgomp/testsuite/libgomp.c++/task-7.C b/libgomp/testsuite/libgomp.c++/task-7.C new file mode 100644 index 0000000..e9828cd --- /dev/null +++ b/libgomp/testsuite/libgomp.c++/task-7.C @@ -0,0 +1,18 @@ +// PR c++/36523 +// { dg-do run } + +template +struct A +{ + A() { } + A(const A&) { } + void foo() { } +}; + +int main() +{ + A a; + #pragma omp task firstprivate (a) + a.foo(); + return 0; +} -- cgit v1.1