This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH, libfortran] PR 47007, 61847 Locale failures in libgfortran
- From: Janne Blomqvist <blomqvist dot janne at gmail dot com>
- To: Jakub Jelinek <jakub at redhat dot com>
- Cc: Fortran List <fortran at gcc dot gnu dot org>, GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Wed, 5 Nov 2014 13:48:32 +0200
- Subject: Re: [PATCH, libfortran] PR 47007, 61847 Locale failures in libgfortran
- Authentication-results: sourceware.org; auth=none
- References: <CAO9iq9GHzVk5WCSbj6CwsDWZ=dh3sNhO8qF4pGCmZ8ZpH1XtQg at mail dot gmail dot com> <20141105110722 dot GD5026 at tucnak dot redhat dot com>
On Wed, Nov 5, 2014 at 1:07 PM, Jakub Jelinek <jakub@redhat.com> wrote:
> On Wed, Nov 05, 2014 at 12:48:01PM +0200, Janne Blomqvist wrote:
>> @@ -3528,6 +3533,11 @@ finalize_transfer (st_parameter_dt *dtp)
>> if ((dtp->common.flags & IOPARM_DT_HAS_SIZE) != 0)
>> *dtp->size = dtp->u.p.size_used;
>>
>> +#ifdef HAVE_USELOCALE
>> + if (dtp->u.p.old_locale != (locale_t) 0)
>> + uselocale (dtp->u.p.old_locale);
>> +#endif
>
> I wonder if you shouldn't clear dtp->u.p.old_locale here too, so
> that uselocale isn't called again.
Sure. In principle this shouldn't be needed, since IIRC the entire
dtp->u.p structure is set to 0 when starting an IO operation, but
OTOH the cost is insignificant.
--
Janne Blomqvist