re PR middle-end/86539 (OpenMP wrong-code with taskloop and references)
authorJakub Jelinek <jakub@redhat.com>
Tue, 17 Jul 2018 08:06:25 +0000 (10:06 +0200)
committerJakub Jelinek <jakub@gcc.gnu.org>
Tue, 17 Jul 2018 08:06:25 +0000 (10:06 +0200)
commit3a10621137037719a99c2e5b75ec2e20c891ad59
tree2f092e709ef9b302a3dcc0c2bdceac26a03a0476
parent980f94b75b8ccd47afa55c6109a5899f325a61ee
re PR middle-end/86539 (OpenMP wrong-code with taskloop and references)

PR middle-end/86539
* gimplify.c (gimplify_omp_for): Ensure taskloop firstprivatized init
and cond temporaries don't have reference type if iterator has
pointer type.  For init use &for_pre_body instead of pre_p if
for_pre_body is non-empty.

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

From-SVN: r262776
gcc/ChangeLog
gcc/gimplify.c
libgomp/ChangeLog
libgomp/testsuite/libgomp.c++/pr86539.C [new file with mode: 0644]