[Patch,fortran] PR28914 Code inside loop hangs

Jerry DeLisle jvdelisle@verizon.net
Sun Sep 10 03:41:00 GMT 2006


The following patch was contributed by Paul Thomas.  I am assisting getting this 
out for 4.2 release.

The attached patch fixes this problem by creating a temporary copy of the loop 
variable used by the constructor so that it does not corrupt that variable if 
used in a surrounding DO LOOP.  The loop variable is restored after the 
constructor is done.

Regression tested on i686-linux-pc-gnu.

OK to commit to 4.2?

Regards,

Jerry

2006-09-09  Paul Thomas <pault@gcc.gnu.org>

	PR fortran/28914
	* trans-array.c (gfc_trans_array_constructor_value): Create a temporary
	loop variable to hold the current loop variable in case it is modified
	by the array constructor.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pr28914.diff
Type: text/x-patch
Size: 1328 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20060910/a1e8a293/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: actual_array_constructor_3.f90
Type: text/x-fortran
Size: 666 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20060910/a1e8a293/attachment-0001.bin>


More information about the Fortran mailing list