[patch, fortran] Fix PR 43072

Steve Kargl sgk@troutmask.apl.washington.edu
Tue Jan 15 22:11:00 GMT 2019


On Tue, Jan 15, 2019 at 10:58:33PM +0100, Thomas Koenig wrote:
> 
> the attached patch fixes a missed optimization where a substring equal
> in length to the original variable currently leads to an unneeded
> temporary.
> 
> Regression-tested. OK for trunk?

Yes.  See below.

> 
> 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
> 	length to the original variable, unless it is an EXPR_SUBSTRING).

in length length?

-- 
Steve



More information about the Fortran mailing list