re PR fortran/43072 (unneeded temporary (s=s+f(a)))
authorThomas Koenig <tkoenig@gcc.gnu.org>
Tue, 15 Jan 2019 22:18:55 +0000 (22:18 +0000)
committerThomas Koenig <tkoenig@gcc.gnu.org>
Tue, 15 Jan 2019 22:18:55 +0000 (22:18 +0000)
commit0335cc372c9849c61b9a5583655820d88ecf829e
tree422262bd5ef07f5e981b8ccb2e3429ce59dd8e15
parent6a0c8e77f289a5c2e1b1ad0f2c8a5c5105f599a6
re PR fortran/43072 (unneeded temporary (s=s+f(a)))

2019-01-15  Thomas Koenig  <tkoenig@gcc.gnu.org>

PR fortran/43072
* resolve.c (resolve_array_ref): Add equal_length argument; set it
if the length of the substring equals that of the orignal
variable.
(resolve_ref): Remove the substring if it is equal in length to
the original variable, unless it is an EXPR_SUBSTRING).

2019-01-15  Thomas Koenig  <tkoenig@gcc.gnu.org>

PR fortran/43072
* gfortran.dg/actual_array_substr_3.f90: New test.

From-SVN: r267953
gcc/fortran/ChangeLog
gcc/fortran/resolve.c
gcc/testsuite/ChangeLog
gcc/testsuite/gfortran.dg/actual_array_substr_3.f90 [new file with mode: 0644]