[Patch, fortran] PR31620 - [4.3 regression] Zeroing one component of array of derived types zeros the whole structure.

Paul Richard Thomas paul.richard.thomas@gmail.com
Sun Apr 22 21:07:00 GMT 2007


:ADDPATCH fortran:

This rather bad regression is due to all the components of an array of
derived types being part of the array in an assignment of zero to one
component.  The patch is self-explanatory and the testcase is the
reporter's.

Regtested on x86_ia64 - OK for trunk?

Paul

2007-04-22  Paul Thomas  <pault@gcc.gnu.org>

	PR fortran/31620
	* trans-expr.c (gfc_trans_assignment): Make the call to
	gfc_trans_zero_assign conditional on the lhs array ref being
	the only reference.

2007-04-22  Paul Thomas  <pault@gcc.gnu.org>

	PR fortran/31620
	* gfortran.dg/zero_array_components_1.f90: New test.

-- 
"Success is the ability to go from one failure to another with no loss
of enthusiasm."  -  Winston Churchill
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pr31620.diff
Type: text/x-patch
Size: 1331 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20070422/51342ab2/attachment.bin>


More information about the Gcc-patches mailing list