http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43366
--- Comment #11 from janus at gcc dot gnu.org 2011-02-10 22:56:21 UTC --- Stupid question, but shouldn't it be possible to replace the call to 'is_scalar_reallocatable_lhs' by a check for the allocatable attribute? Index: gcc/fortran/trans-expr.c =================================================================== --- gcc/fortran/trans-expr.c (revision 169986) +++ gcc/fortran/trans-expr.c (working copy) @@ -6116,8 +6087,7 @@ if (lss == gfc_ss_terminator) { /* F2003: Add the code for reallocation on assignment. */ - if (gfc_option.flag_realloc_lhs - && is_scalar_reallocatable_lhs (expr1)) + if (gfc_option.flag_realloc_lhs && gfc_expr_attr (expr1).allocatable) alloc_scalar_allocatable_for_assignment (&block, rse.string_length, expr1, expr2); AFAICS, the routine does not do anything more anyway, right?