gcc/libgomp/testsuite/libgomp.c++/pr70376.C
Jakub Jelinek 048336099e re PR c++/70376 (OpenMP taskloop construct fails to instantiate copy constructor(same as Bug 48869))
PR c++/70376
	* cp-gimplify.c (genericize_omp_for_stmt): Don't walk OMP_FOR_CLAUSES
	for OMP_TASKLOOP here.
	(cp_genericize_r): Handle OMP_TASKLOOP like OMP_TASK, except do call
	genericize_omp_for_stmt instead of cp_walk_tree on OMP_BODY.

	* testsuite/libgomp.c++/pr70376.C: New test.

From-SVN: r234437
2016-03-23 19:42:19 +01:00

21 lines
224 B
C

// PR c++/70376
// { dg-do link }
template <typename T>
struct A
{
A() { }
A(const A&) { }
void foo() { }
};
int
main ()
{
A<int> a;
#pragma omp taskloop
for (int i = 0; i < 64; i++)
a.foo();
return 0;
}