[Bug fortran/49954] New: ICE assigning concat expression to an array deferred-length string (realloc on assignment)
burnus at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Wed Aug 3 07:17:00 GMT 2011
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: unassigned@gcc.gnu.org
ReportedBy: burnus@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 ;-)
More information about the Gcc-bugs
mailing list