https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67679
--- Comment #9 from Thomas Koenig <tkoenig at gcc dot gnu.org> --- Author: tkoenig Date: Tue Feb 5 21:23:07 2019 New Revision: 268560 URL: https://gcc.gnu.org/viewcvs?rev=268560&root=gcc&view=rev Log: 2019-02-05 Thomas Koenig <tkoe...@gcc.gnu.org> PR fortran/67679 Backport from trunk * trans-array.c (gfc_array_allocate): For setting the bounds on the new array, add a condition for a not previously allocated variable. 2019-02-05 Thomas Koenig <tkoe...@gcc.gnu.org> PR fortran/67679 Backport from trunk * gfortran.dg/warn_undefined_1.f90: New test. * gfortran.dg/coarray_lock_7.f90: Fix patterns in test. Added: branches/gcc-7-branch/gcc/testsuite/gfortran.dg/warn_undefined_1.f90 Modified: branches/gcc-7-branch/gcc/fortran/ChangeLog branches/gcc-7-branch/gcc/fortran/trans-array.c branches/gcc-7-branch/gcc/testsuite/ChangeLog branches/gcc-7-branch/gcc/testsuite/gfortran.dg/coarray_lock_7.f90