$ cat forall_3.f90 
  type t
    integer :: p(1)
  end type
  type (t), dimension (1) :: v
  integer i

  forall (i=1:1,.false.)
    v(i)%p = v(i+1)%p
  end forall
end
$ gfortran forall_3.f90 -fbounds-check && ./a.out 
Fortran runtime error: Array reference out of bounds


-- 
           Summary: Bad interaction between bounds checking, forall and
                    derived types
           Product: gcc
           Version: 4.2.0
            Status: UNCONFIRMED
          Keywords: ice-checking
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: fxcoudert at gcc dot gnu dot org
OtherBugsDependingO 27766
             nThis:


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

Reply via email to