https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66633
--- Comment #17 from Jakub Jelinek <jakub at gcc dot gnu.org> --- Author: jakub Date: Fri Jul 10 14:13:19 2015 New Revision: 225677 URL: https://gcc.gnu.org/viewcvs?rev=225677&root=gcc&view=rev Log: Backported from mainline 2015-07-09 Jakub Jelinek <ja...@redhat.com> PR middle-end/66633 * tree-nested.c (get_static_chain): Or in a flag into info->static_chain_added. (get_frame_field, get_nonlocal_debug_decl): Likewise. (convert_nonlocal_omp_clauses, convert_local_omp_clauses): Revert 2015-07-01 changes. (convert_tramp_reference_stmt): If a frame_decl or chain_decl is needed newly inside of GIMPLE_OMP_{PARALLEL,TASK,TARGET} body, add it to clauses. * gcc.dg/gomp/pr66633-1.c: New test. * gcc.dg/gomp/pr66633-2.c: New test. * gcc.dg/gomp/pr66633-3.c: New test. * gcc.dg/gomp/pr66633-4.c: New test. Added: branches/gcc-5-branch/gcc/testsuite/gcc.dg/gomp/pr66633-1.c branches/gcc-5-branch/gcc/testsuite/gcc.dg/gomp/pr66633-2.c branches/gcc-5-branch/gcc/testsuite/gcc.dg/gomp/pr66633-3.c branches/gcc-5-branch/gcc/testsuite/gcc.dg/gomp/pr66633-4.c Modified: branches/gcc-5-branch/gcc/ChangeLog branches/gcc-5-branch/gcc/testsuite/ChangeLog branches/gcc-5-branch/gcc/tree-nested.c