[Fortran, Patch, pr66911, gcc-5, v1] ICE on allocate character with source as a derived type component
Andre Vehreschild
vehre@gmx.de
Sun Apr 3 15:34:00 GMT 2016
Hi all,
attached patch fixes the ICE when using a deferred length char array as
source= expression in an allocate for complicated source= expressions.
Before the patch the compiler was relying on having the string length
available in the ts of the expression, but when the expression is
sufficiently complicated it is not set there. In trunk the problem does
not arise, because the source= expression is evaluated in more cases.
In gcc-5 this is not available without doing a major rewrite of the
allocate() statement's conv-routine. Therefore this small portion of
extra code reliably does the trick and takes the string_length from the
se.string_length now.
Bootstrapped and regtested ok on x86_64-linux-gnu/F23. Ok for
gcc-5-branch?
Regards,
Andre
--
Andre Vehreschild * Email: vehre ad gmx dot de
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pr66911_gcc-5_1.clog
Type: application/octet-stream
Size: 392 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20160403/366066bc/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pr66911_gcc-5_1.patch
Type: text/x-patch
Size: 1833 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20160403/366066bc/attachment.bin>
More information about the Fortran
mailing list