This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/49954] New: ICE assigning concat expression to an array deferred-length string (realloc on assignment)
- From: "burnus at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 3 Aug 2011 07:16:53 +0000
- Subject: [Bug fortran/49954] New: ICE assigning concat expression to an array deferred-length string (realloc on assignment)
- Auto-submitted: auto-generated
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 ;-)