https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78884
--- Comment #12 from Jakub Jelinek <jakub at gcc dot gnu.org> --- Author: jakub Date: Thu Aug 29 15:05:01 2019 New Revision: 275045 URL: https://gcc.gnu.org/viewcvs?rev=275045&root=gcc&view=rev Log: Backported from mainline 2019-07-04 Jakub Jelinek <ja...@redhat.com> PR middle-end/78884 * gimplify.c (struct gimplify_omp_ctx): Add add_safelen1 member. (gimplify_bind_expr): If seeing TREE_ADDRESSABLE VLA inside of simd loop body, set ctx->add_safelen1 instead of making it GOVD_PRIVATE. (gimplify_adjust_omp_clauses): Add safelen (1) clause if ctx->add_safelen1 is set. * gcc.dg/gomp/pr78884.c: New test. Added: branches/gcc-8-branch/gcc/testsuite/gcc.dg/gomp/pr78884.c Modified: branches/gcc-8-branch/gcc/ChangeLog branches/gcc-8-branch/gcc/gimplify.c branches/gcc-8-branch/gcc/testsuite/ChangeLog