https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85631
--- Comment #5 from Thomas Koenig <tkoenig at gcc dot gnu.org> --- Author: tkoenig Date: Sat Jun 9 14:15:53 2018 New Revision: 261359 URL: https://gcc.gnu.org/viewcvs?rev=261359&root=gcc&view=rev Log: 2018-06-09 Thomas Koenig <tkoe...@gcc.gnu.org> PR fortran/85631 Backport from trunk. * trans.h (gfc_ss): Add field no_bounds_check. * trans-array.c (gfc_conv_ss_startstride): If flag_realloc_lhs and ss->no_bounds_check is set, do not use runtime checks. * trans-expr.c (gfc_trans_assignment_1): Set lss->no_bounds_check for reallocatable lhs. 2018-06-09 Thomas Koenig <tkoe...@gcc.gnu.org> PR fortran/85631 Backport from trunk. * gfortran.dg/bounds_check_20.f90: New test. Added: branches/gcc-8-branch/gcc/testsuite/gfortran.dg/bounds_check_20.f90 Modified: branches/gcc-8-branch/gcc/fortran/ChangeLog branches/gcc-8-branch/gcc/fortran/trans-array.c branches/gcc-8-branch/gcc/fortran/trans-expr.c branches/gcc-8-branch/gcc/fortran/trans.h branches/gcc-8-branch/gcc/testsuite/ChangeLog