This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug fortran/49954] New: ICE assigning concat expression to an array deferred-length string (realloc on assignment)


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 ;-)


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]