This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [Patch, fortran] PR34955 - transfer_assumed_size_1.f90: Valgrind error: invalid read of size 3
- From: "Paul Richard Thomas" <paul dot richard dot thomas at gmail dot com>
- To: "fortran at gcc dot gnu dot org" <fortran at gcc dot gnu dot org>, gcc-patches <gcc-patches at gcc dot gnu dot org>
- Date: Tue, 13 Jan 2009 11:18:32 +0100
- Subject: Re: [Patch, fortran] PR34955 - transfer_assumed_size_1.f90: Valgrind error: invalid read of size 3
- References: <339c37f20901122217m5462e45ma6e83200a3842bd1@mail.gmail.com>
I have, of course, removed transfer_array_intrinsic_4.f90~ :-)
Paul
On Tue, Jan 13, 2009 at 7:17 AM, Paul Richard Thomas
<paul.richard.thomas@gmail.com> wrote:
> Dear All,
>
> The title of this problem describes the problem clearly. It comes
> about only for scalar character transfers where the source is shorter
> than the destination. As described in the PR, the solution is to make
> a temporary, with the length of the destination and only copy the
> source into it. All this was effected by use of the mechanics evolved
> for array transfers, where the different situations of source versus
> destination lengths and the presence of SIZE were correctly (I hope!)
> treated. The use of packing of the source has been eliminated, except
> for variables that are not full arrays.
>
> Bootstrapped and regtested on FC9/x86_i64 - OK for 4.5 and, eventually, for 4.4?
>
> Paul
>
> 2009-01-13 Paul Thomas <pault@gcc.gnu.org>
>
> PR fortran/34955
> * trans-intrinsic.c (gfc_conv_intrinsic_array_transfer): Has
> been absorbed into gfc_conv_intrinsic_transfer. All
> references to it in trans-intrinsic.c have been changed
> accordingly. PR fixed by using a temporary for scalar
> character transfer, when the source is shorter than the
> destination.
>
> 2009-01-13 Paul Thomas <pault@gcc.gnu.org>
>
> PR fortran/34955
> * gfortran.dg/transfer_intrinsic_1.f90: New test.
>
--
The knack of flying is learning how to throw yourself at the ground and miss.
--Hitchhikers Guide to the Galaxy