This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/51502] New: [4.6/4.7 Regression] Potentially wrong code due to wrong implict_pure check
- From: "burnus 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 17:03:17 +0000
- Subject: [Bug fortran/51502] New: [4.6/4.7 Regression] Potentially wrong code due to wrong implict_pure check
- Auto-submitted: auto-generated
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51502
Bug #: 51502
Summary: [4.6/4.7 Regression] Potentially wrong code due to
wrong implict_pure check
Classification: Unclassified
Product: gcc
Version: 4.7.0
Status: UNCONFIRMED
Keywords: wrong-code
Severity: normal
Priority: P3
Component: fortran
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: burnus@gcc.gnu.org
The following code has a procedure which is not PURE as it accesses a
host-associated variable. However, this is not detected and thus the procedure
is marked as IMPLICIT_PURE as "grep _PURE m.mod" shows:
0 0 SUBROUTINE IMPLICIT_PURE) (UNKNOWN 0 0 0 0 UNKNOWN ()) 3 0 (4) () 0
module m
integer :: i
contains
subroutine foo(x)
integer, intent(inout) :: x
outer: block
block
i = 5
end block
end block outer
end subroutine foo
end module m