diff options
author | Jakub Jelinek <jakub@redhat.com> | 2016-03-23 19:42:19 +0100 |
---|---|---|
committer | Jakub Jelinek <jakub@gcc.gnu.org> | 2016-03-23 19:42:19 +0100 |
commit | 048336099ee3c4e29510f140f5505ce2ad79bf55 (patch) | |
tree | 0578dd5aac3ba224d4ec3d82bfdd70c8163acfde /libgomp/testsuite | |
parent | 05aca4e73c2b4b18dcf617a8548e754161a28eea (diff) | |
download | gcc-048336099ee3c4e29510f140f5505ce2ad79bf55.zip gcc-048336099ee3c4e29510f140f5505ce2ad79bf55.tar.gz gcc-048336099ee3c4e29510f140f5505ce2ad79bf55.tar.bz2 |
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
Diffstat (limited to 'libgomp/testsuite')
-rw-r--r-- | libgomp/testsuite/libgomp.c++/pr70376.C | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/libgomp/testsuite/libgomp.c++/pr70376.C b/libgomp/testsuite/libgomp.c++/pr70376.C new file mode 100644 index 0000000..595c2cc --- /dev/null +++ b/libgomp/testsuite/libgomp.c++/pr70376.C @@ -0,0 +1,20 @@ +// 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; +} |