http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49954
Summary: ICE assigning concat expression to an array deferred-length string (realloc on assignment) Product: gcc Version: 4.7.0 Status: UNCONFIRMED Keywords: ice-on-valid-code Severity: normal Priority: P3 Component: fortran AssignedTo: unassig...@gcc.gnu.org ReportedBy: bur...@gcc.gnu.org Blocks: 45170 Follow up to PR 47674. The following ICEs in trans-arrays.c's gfc_alloc_allocatable_for_assignment tmp = expr2->ts.u.cl->backend_decl; gcc_assert (expr1->ts.u.cl->backend_decl); tmp = fold_convert (TREE_TYPE (expr1->ts.u.cl->backend_decl), tmp); My guess is that the first "tmp" is a NULL_TREE. character(len=:), allocatable :: array_string(:) array_string = ["ABCDEFGH"] array_string = array_string // "A" print '(*(g0))','>',array_string,'<', len(array_string) end Also for the following variants: array_string // ["A"] array_string(1:2) // "A" array_string(1:2) // ["A"] Expected: No ICE, the use of a temporary and the correct result ;-)