[gfortran,patch] Fix allocation of temporaries having negative extent

François-Xavier Coudert fxcoudert@gmail.com
Thu Feb 8 11:38:00 GMT 2007


:ADDPATCH fortran:

Attached patch fixes PR30720, where we ask the front-end to generate
code to allocate an array that has negative extent in one dimension.
Having negative extent is strictly equivalent to having zero extent,
so we should explicitly check and correct this case (I've been doing
that already in many other places, so I assume that parts of the
front-end code were originally written with the assumption that
negative extents never happened :)

Also, I simplified the original code (by Thomas K.) because I think a
COND_EXPR is less heavy than generating different blocks.

Bootstrapped & regtested on i686-linux, will come with a testcase from
the PR. OK for mainline and 4.2?

FX
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pr30720.ChangeLog
Type: application/octet-stream
Size: 529 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20070208/0cac44ed/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pr30720.diff
Type: text/x-patch
Size: 5887 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20070208/0cac44ed/attachment.bin>


More information about the Gcc-patches mailing list