[patch, Fortran] Fix some string temporaries

Thomas Koenig tkoenig@netcologne.de
Sat Jul 16 13:38:00 GMT 2016


Hello world,

this fixes PR 71902. The recent fix for PR 71783 introduced a
performance and code size regression a string temporary was created for
the test case when it was not actually needed.

I also took the opportunity of renaming the misnomed temporary
variable.

Regression-tested.

OK for trunk?

Do we actually want to backport this? Technically, it is a regression,
but people are not likely to notice much.

Regards

	Thomas

2016-07-16  Thomas Koenig  <tkoenig@gcc.gnu.org>

         PR fortran/71902
         * dependency.c (gfc_check_dependency): Use dep_ref.  Handle case
         if identical is true and two array element references differ.
         (gfc_dep_resovler):  Move most of the code to dep_ref.
         (dep_ref):  New function.
         * frontend-passes.c (realloc_string_callback):  Name temporary
         variable "realloc_string".

2016-07-16  Thomas Koenig  <tkoenig@gcc.gnu.org>

         PR fortran/71902
         * gfortran.dg/dependency_47.f90:  New test.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: p3.diff
Type: text/x-patch
Size: 4734 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20160716/6b0acc95/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: dependency_47.f90
Type: text/x-fortran
Size: 469 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20160716/6b0acc95/attachment-0001.bin>


More information about the Fortran mailing list