re PR fortran/32036 (Multiple evaluation of array index with bounds checking)
authorFrancois-Xavier Coudert <fxcoudert@gcc.gnu.org>
Sat, 14 Jul 2007 23:59:00 +0000 (23:59 +0000)
committerFrançois-Xavier Coudert <fxcoudert@gcc.gnu.org>
Sat, 14 Jul 2007 23:59:00 +0000 (23:59 +0000)
commita90552d5640745659ced7aca0d285a61da3b11ff
tree2c7ec1151f8d0b27f09195b5c55c57e8ba9c9a34
parent37058415033503179d69f4d58e08dddae0a44142
re PR fortran/32036 (Multiple evaluation of array index with bounds checking)

PR fortran/32036

* trans-array.c (gfc_conv_array_ref): Only evaluate index once.

* gfortran.dg/bounds_check_8.f90: New test.
* gfortran.dg/do_iterator_2.f90: Make code legal Fortran.

From-SVN: r126647
gcc/fortran/ChangeLog
gcc/fortran/trans-array.c
gcc/testsuite/ChangeLog
gcc/testsuite/gfortran.dg/bounds_check_8.f90 [new file with mode: 0644]
gcc/testsuite/gfortran.dg/do_iterator_2.f90