PR middle-end/86539
commit987a432c52df3be1af13bfd588a1a203d92f695f
authorjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 17 Jul 2018 08:06:25 +0000 (17 08:06 +0000)
committerjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 17 Jul 2018 08:06:25 +0000 (17 08:06 +0000)
tree2f092e709ef9b302a3dcc0c2bdceac26a03a0476
parent277e090c028d02be7cdda2c5e197c0ba4040428d
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.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@262776 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/ChangeLog
gcc/gimplify.c
libgomp/ChangeLog
libgomp/testsuite/libgomp.c++/pr86539.C [new file with mode: 0644]