re PR fortran/58085 (Wrong indexing of an array in ASSOCIATE)
authorPaul Thomas <pault@gcc.gnu.org>
Sun, 13 Apr 2014 11:58:55 +0000 (11:58 +0000)
committerPaul Thomas <pault@gcc.gnu.org>
Sun, 13 Apr 2014 11:58:55 +0000 (11:58 +0000)
commit1cf43a1dbdb4f61d2f9bbfffb2fdc6130aa07781
treea0e9223d3fa93775c9210bdc4aade00d42633cb2
parentef3a248fbb9c61d510cdcee3de0476994ae32790
re PR fortran/58085 (Wrong indexing of an array in ASSOCIATE)

2014-04-13  Paul Thomas  <pault@gcc.gnu.org>

PR fortran/58085
PR fortran/60717
* trans.h: Add 'use_offset' bitfield to gfc_se.
* trans-array.c (gfc_conv_expr_descriptor): Use 'use_offset'
as a trigger to unconditionally recalculate the offset for
array slices and constant arrays.
trans-expr.c (gfc_conv_intrinsic_to_class): Use it.
trans-stmt.c (trans_associate_var): Ditto.
(gfc_conv_procedure_call): Ditto.

2014-04-13  Paul Thomas  <pault@gcc.gnu.org>

PR fortran/60717
* gfortran.dg/unlimited_polymorphic_17.f90: New test.

PR fortran/58085
* gfortran.dg/associate_15.f90: New test.

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