https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80809
--- Comment #5 from Jakub Jelinek <jakub at gcc dot gnu.org> --- Author: jakub Date: Mon May 22 18:54:54 2017 New Revision: 248346 URL: https://gcc.gnu.org/viewcvs?rev=248346&root=gcc&view=rev Log: PR middle-end/80809 * omp-low.c (finish_taskreg_remap): New function. (finish_taskreg_scan): If unit size of ctx->record_type is non-constant, unshare the size expression and replace decls in it with possible outer var refs. * testsuite/libgomp.c/pr80809-2.c: New test. * testsuite/libgomp.c/pr80809-3.c: New test. Added: trunk/libgomp/testsuite/libgomp.c/pr80809-2.c trunk/libgomp/testsuite/libgomp.c/pr80809-3.c Modified: trunk/gcc/ChangeLog trunk/gcc/omp-low.c trunk/libgomp/ChangeLog