https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89621
--- Comment #5 from Jakub Jelinek <jakub at gcc dot gnu.org> --- Author: jakub Date: Thu Mar 28 22:33:29 2019 New Revision: 270009 URL: https://gcc.gnu.org/viewcvs?rev=270009&root=gcc&view=rev Log: PR middle-end/89621 * tree-inline.h (struct copy_body_data): Add dont_remap_vla_if_no_change flag. * tree-inline.c (remap_type_3, remap_type_2): New functions. (remap_type): Don't remap vla types if id->dont_remap_vla_if_no_change and remap_type_2 returns false. * omp-low.c (new_omp_context): Set ctx->cb.dont_remap_vla_if_no_change. Move ctx->cb.adjust_array_error_bounds setting to the outermost ctx only from where it is copied to nested contexts. * gfortran.dg/gomp/pr89621.f90: New test. Added: trunk/gcc/testsuite/gfortran.dg/gomp/pr89621.f90 Modified: trunk/gcc/ChangeLog trunk/gcc/omp-low.c trunk/gcc/testsuite/ChangeLog trunk/gcc/tree-inline.c trunk/gcc/tree-inline.h