[Patch, Fortran, PR58586, v1] ICE with derived type with allocatable component passed by value

Andre Vehreschild vehre@gmx.de
Wed Apr 15 18:03:00 GMT 2015


Hi all,

by accident I patched this pr. For short, when a structure constructor for a
structure with an allocatable component or a function returning a type with an
allocatable component is passed as actual argument to a function, then gfortran
ICEs. This patch fixes, both the ICE and a segfault at runtime.

I was pointed to the patch in comment #44 of pr61831 which seemingly fixes the
#3 comment of pr58586, too, but causes a memory leak. I therefore like to point
out, that adding the a->expr.expr_type != EXPR_STRUCTURE of Mikael's patch in
pr61831 should not be added to trans-expr.c::gfc_conv_procedure_call (), when
this patch for 58586 is applied.

Bootstraps and regtests ok on x86_64-linux-gnu/F21.

Ok, for trunk 6.0, when open again?

Regards,
	Andre
-- 
Andre Vehreschild * Email: vehre ad gmx dot de 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pr58586_1.clog
Type: application/octet-stream
Size: 393 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20150415/988879c6/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pr58586_1.patch
Type: text/x-patch
Size: 1951 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20150415/988879c6/attachment.bin>


More information about the Gcc-patches mailing list