re PR fortran/85631 (Runtime error message array bound mismatch with nonzero optimiza...
authorThomas Koenig <tkoenig@gcc.gnu.org>
Fri, 8 Jun 2018 22:04:11 +0000 (22:04 +0000)
committerThomas Koenig <tkoenig@gcc.gnu.org>
Fri, 8 Jun 2018 22:04:11 +0000 (22:04 +0000)
commitd1ecece9af3adc46eb1cc716608c38692d57f9c1
treee24f8e9128ee4c3b371e623ecdbdba86ba21bc63
parent058872eaadac43dcf75839ba6b951619fea14fe1
re PR fortran/85631 (Runtime error message array bound mismatch with nonzero optimization)

2018-06-08  Thomas Koenig  <tkoenig@gcc.gnu.org>

PR fortran/85631
* 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-08  Thomas Koenig  <tkoenig@gcc.gnu.org>

PR fortran/85631
* gfortran.dg/bounds_check_20.f90: New test.

From-SVN: r261348
gcc/fortran/ChangeLog
gcc/fortran/trans-array.c
gcc/fortran/trans-expr.c
gcc/fortran/trans.h
gcc/testsuite/ChangeLog
gcc/testsuite/gfortran.dg/bounds_check_20.f90 [new file with mode: 0644]