This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
Re: [Patch, Fortran] PR56737 - Fixing a bug in the I/O format cache handling
- From: Jerry DeLisle <jvdelisle at charter dot net>
- To: Tobias Burnus <burnus at net-b dot de>
- Cc: gcc patches <gcc-patches at gcc dot gnu dot org>, gfortran <fortran at gcc dot gnu dot org>
- Date: Thu, 28 Mar 2013 18:29:24 -0700
- Subject: Re: [Patch, Fortran] PR56737 - Fixing a bug in the I/O format cache handling
- References: <51541271 dot 4060707 at net-b dot de> <515419B1 dot 5060102 at net-b dot de>
On 03/28/2013 03:21 AM, Tobias Burnus wrote:
> Tobias Burnus wrote:
>> b) To copy the format string
>>
>> The attached patch does the latter. The current hashing algorithm avoids hash
>> collisions by checking whether the value is exactly the same - and the value
>> is given by the format string. Thus, instead of copying the string when
>> storing the format in the cache, the patch copies it now before calling
>> parse_format_list.
>
> Re-reading what Jerry wrote, I realized that the current code disables format
> caching for strings (but not for Holleriths). With my patch, that's no longer
> required. Attached is a missed-optimization patch.
>
>> Bootstrapped and regtested on x86-64-gnu-linux.
>> OK for the trunk and the 4.6/4.7/4.8 branches?
>
> (Or should the follow-up patch only applied to the trunk?)
>
I would treat all as part of one patch fixing the original issue which was a
known TODO:
Please goto trunk first and give it some settling time. If all is OK, I would
go ahead and backport. It does fix a regression.
Jerry