https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68227

            Bug ID: 68227
           Summary: ICE on using variable limit in forall header
                    (gfc_do_allocate)
           Product: gcc
           Version: 5.2.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: gerhard.steinmetz.fort...@t-online.de
  Target Milestone: ---

This code with variable n :

$ cat y2.f90
program p
   type t
   end type
   type t2
      type(t), pointer :: a
   end type

   type(t), target :: x
   type(t2), pointer :: y(:)
   integer :: i
   integer :: n = 2

   allocate (y(n))
   forall (i=1:n) y(i)%a = x
end


$ gfortran -g -O0 -Wall -fcheck=all y2.f90
y2.f90:14:0:

    forall (i=1:n) y(i)%a = x
 1
internal compiler error: in gfc_do_allocate, at fortran/trans-stmt.c:3121

Reply via email to