[Bug fortran/20833] New: LEN of a null slice and temporaries don't mix up well

fxcoudert at gcc dot gnu dot org gcc-bugzilla@gcc.gnu.org
Fri Apr 8 15:40:00 GMT 2005


$ cat fc019.f90 
! Original bug-report submitted by Walt Brainerd, The Fortran Company
  character(len=128) :: ASCII = ' '

! This works
  integer i
  i = len (ASCII(1:0))
  print *, i

! This works too
  print *, len (ASCII(1:2))

! This fails
  print *, len (ASCII(1:0))
  end

$ gfc fc019.f90 && ./a.out
fc019.f90: In function ‘MAIN__’:
fc019.f90:13: internal compiler error: in expand_expr_addr_expr_1, at expr.c:6218


Note that is works for ASCII(1,2) and it works for ASCII(1:0) if you use a
variable to store the result.

-- 
           Summary: LEN of a null slice and temporaries don't mix up well
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: fxcoudert at gcc dot gnu dot org
                CC: gcc-bugs at gcc dot gnu dot org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20833



More information about the Gcc-bugs mailing list