This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/51502] [4.6/4.7 Regression] Potentially wrong code generation due to wrong implict_pure check
- From: "tkoenig at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sun, 11 Dec 2011 20:29:39 +0000
- Subject: [Bug fortran/51502] [4.6/4.7 Regression] Potentially wrong code generation due to wrong implict_pure check
- Auto-submitted: auto-generated
- References: <bug-51502-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51502
Thomas Koenig <tkoenig at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2011-12-11
CC| |tkoenig at gcc dot gnu.org
Ever Confirmed|0 |1
--- Comment #1 from Thomas Koenig <tkoenig at gcc dot gnu.org> 2011-12-11 20:29:39 UTC ---
Nitpick: A pure procedure could access the variable, but
it could assign a value to it.
Because
module m
integer :: i
contains
pure subroutine foo(x)
integer, intent(inout) :: x
outer: block
block
i = 5
end block
end block outer
end subroutine foo
end module m
gives the error
Error: Variable 'i' can not appear in a variable definition context
(assignment) at (1) in PURE procedure
the fix should be straightforward.