Using the following invalid program, one gets an ICE
 NAG f95: Assignment to Z in PURE procedure BAR
gfortran: segmentation fault.

subroutine foo ()
  integer :: z
contains
  pure function bar (a)
    integer, intent(in) :: a
    integer :: bar
    z = 45 ! <<<<<<<<<<<
    bar = a
  end function bar
end subroutine foo


-- 
           Summary: ICE: Accessing non-local variable in PURE function
           Product: gcc
           Version: 4.3.0
            Status: UNCONFIRMED
          Keywords: ice-on-invalid-code
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: burnus at gcc dot gnu dot org


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

Reply via email to