gcc/libgomp/testsuite/libgomp.c++/task-7.C
Jakub Jelinek 2368a460c8 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
2008-06-20 04:18:07 +02:00

19 lines
203 B
C

// PR c++/36523
// { dg-do run }
template<typename T>
struct A
{
A() { }
A(const A&) { }
void foo() { }
};
int main()
{
A<int> a;
#pragma omp task firstprivate (a)
a.foo();
return 0;
}