[Patch, fortran] PR38915 - wrong results for structure assignment of character components when left and right sides overlap

Paul Richard Thomas paul.richard.thomas@gmail.com
Wed Jan 28 13:39:00 GMT 2009


The attached is a belt-and-braces approach to the string length of
temporaries getting lost in simple assignments of character derived
type components.

Bootstrapped and regtested on FC9/x86_64 - OK for 4.5?

Paul

2009-01-28  Paul Thomas  <pault@gcc.gnu.org>

	PR fortran/38915
	* trans-expr.c (gfc_trans_assignment_1): Ensure temporaries
	have a string_length.

2009-01-28  Paul Thomas  <pault@gcc.gnu.org>

	PR fortran/38915
	* gfortran.dg/char_length_15.f90: New test.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: submit.diff
Type: application/octet-stream
Size: 2306 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20090128/81e935ad/attachment.obj>


More information about the Fortran mailing list