http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48705
--- Comment #2 from janus at gcc dot gnu.org 2011-05-15 17:40:06 UTC --- (In reply to comment #1) > use generic_deferred > implicit none > type(addable) :: x, y > class(addable), allocatable :: z > x = addable((/1,2/)) > y = addable((/2,-2/)) > allocate(z,source=add(x,y)) > end program prog > > > The ICE comes from the ALLOCATE statement. I think we'll need to insert a temporary for cases like this, where the SOURCE is not just an EXPR_VARIABLE (cf. gfc_trans_allocate in trans-stmt.c).