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: unassig...@gcc.gnu.org ReportedBy: bur...@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