This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [Patch, fortran] PR34955 - transfer_assumed_size_1.f90: Valgrind error: invalid read of size 3


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]