[Bug fortran/51502] [4.6/4.7 Regression] Potentially wrong code generation due to wrong implict_pure check
tkoenig at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Sun Dec 11 20:36:00 GMT 2011
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.
More information about the Gcc-bugs
mailing list