http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43366
--- Comment #12 from Tobias Burnus <burnus at gcc dot gnu.org> 2011-02-11 19:38:23 UTC --- (In reply to comment #10) > The following patch makes the test case in comment #3 work correctly: I think your current patch only works if declared type (LHS) == effective type RHS. I think you need to use the size of the effective types ("_size"). The change should be in trans-expr.c's alloc_scalar_allocatable_for_assignment. Cf. "Determine allocate size" in trans-stmt.c's gfc_trans_allocate (In reply to comment #11) > Stupid question, but shouldn't it be possible to replace the call to > 'is_scalar_reallocatable_lhs' by a check for the allocatable attribute? I guess so - though I have not studied the code.