Backported from mainline 2017-09-14 Jakub Jelinek <jakub@redhat.com> PR c++/81314 * cp-gimplify.c (omp_var_to_track): Look through references. (omp_cxx_notice_variable): Likewise. * testsuite/libgomp.c++/pr81314.C: New test. From-SVN: r252806