[patch,libfortran] PR30145 write statement fails to ignore zero-sized array
Jerry DeLisle
jvdelisle@verizon.net
Fri Dec 15 19:51:00 GMT 2006
:ADDPATCH fortran:
The included patch is trivial and fixes this PR.
Regression tested on x86-64-linux.
I will commit as obvious and simple later today.
Jerry
2006-12-15 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR libfortran/30145
* io/transfer.c (transfer_array): Check for negative extent.
Index: transfer.c
===================================================================
*** transfer.c (revision 119881)
--- transfer.c (working copy)
*************** transfer_array (st_parameter_dt *dtp, gf
*** 1478,1484 ****
/* If the extent of even one dimension is zero, then the entire
array section contains zero elements, so we return. */
! if (extent[n] == 0)
return;
}
--- 1478,1484 ----
/* If the extent of even one dimension is zero, then the entire
array section contains zero elements, so we return. */
! if (extent[n] <= 0)
return;
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: write_zero_array.f90
Type: text/x-fortran
Size: 515 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20061215/ff729e7c/attachment.bin>
More information about the Fortran
mailing list