[Patch, Fortran, pr70397, gcc-5, v1] [5/6 Regression] ice while allocating ultimate polymorphic
Andre Vehreschild
vehre@gmx.de
Sun Mar 27 16:49:00 GMT 2016
Hi all,
attached is a patch to fix an ICE on allocating an unlimited polymorphic entity
from a non-poly class or type without an length component. The routine
gfc_copy_class_to_class() assumed that both the source and destination object's
type is unlimited polymorphic, but in this case it is true for the destination
only, which made gfortran look for a non-existent _len component in the source
object and therefore ICE. This is fixed by the patch by adding a function to
return either the _len component, when it exists, or a constant zero node to
init the destination object's _len component with.
Bootstrapped and regtested ok on x86_64-linux-gnu/F23. (Might have some
line deltas, because my git is a bit older. Sorry, only have limited/slow
net-access currently.)
The same patch should be adaptable to trunk. To come...
Ok for 5-trunk?
Regards,
Andre
--
Andre Vehreschild * vehre at gcc dot gnu.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pr70391_1.clog
Type: application/octet-stream
Size: 592 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20160327/7351e458/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pr70391_1.patch
Type: text/x-patch
Size: 4409 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20160327/7351e458/attachment.bin>
More information about the Fortran
mailing list