https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83246
--- Comment #8 from Jakub Jelinek <jakub at gcc dot gnu.org> --- Author: jakub Date: Thu Feb 7 14:52:41 2019 New Revision: 268642 URL: https://gcc.gnu.org/viewcvs?rev=268642&root=gcc&view=rev Log: Backported from mainline 2019-02-01 Jakub Jelinek <ja...@redhat.com> PR fortran/83246 PR fortran/89084 * trans-decl.c (generate_local_decl): Add referenced FL_PARAMETERs if sym->ns->construct_entities rather than if sym->ns->parent->code->op == EXEC_BLOCK. * gfortran.dg/pr89084.f90: New test. * gfortran.dg/lto/pr89084_0.f90: New test. * gfortran.dg/pr83246.f90: New test. Added: branches/gcc-8-branch/gcc/testsuite/gfortran.dg/lto/pr89084_0.f90 branches/gcc-8-branch/gcc/testsuite/gfortran.dg/pr83246.f90 branches/gcc-8-branch/gcc/testsuite/gfortran.dg/pr89084.f90 Modified: branches/gcc-8-branch/gcc/fortran/ChangeLog branches/gcc-8-branch/gcc/fortran/trans-decl.c branches/gcc-8-branch/gcc/testsuite/ChangeLog