This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug fortran/51502] New: [4.6/4.7 Regression] Potentially wrong code due to wrong implict_pure check


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]