This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/32884] New: ICE: Accessing non-local variable in PURE function
- From: "burnus at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 24 Jul 2007 17:19:08 -0000
- Subject: [Bug fortran/32884] New: ICE: Accessing non-local variable in PURE function
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
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