[libgfortran,patch] Fix RESHAPE for zero-sized array sections
François-Xavier Coudert
fxcoudert@gmail.com
Fri Nov 3 07:33:00 GMT 2006
Hi all,
Attached patch makes RESHAPE behaves correctly on zero-sized array
sections (PR 27895). I don't know why I didn't spot it last time I
looked, as it's really easy: at the start of the routine, when
counting dimensions and extents, you simply use flags to mark if
either source or pad arrays are zero-sized (the flags are named
sempty, pempty). Then, before the main loop, you take the appropriate
action.
This patch fixes an embarassing wrong-code bug, as wrong-code always
are. Regtested on i686-linux (well, on a revision before the bootstrap
breakage :) OK for mainline, 4.2 and 4.1?
FX
:ADDPATCH libgfortran:
-------------- next part --------------
A non-text attachment was scrubbed...
Name: reshape_zerosized.ChangeLog
Type: application/octet-stream
Size: 384 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20061103/3c2efbe7/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: reshape_zerosized.diff
Type: text/x-patch
Size: 6110 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20061103/3c2efbe7/attachment.bin>
More information about the Gcc-patches
mailing list