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/32884] New: ICE: Accessing non-local variable in PURE function


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


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