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/71027] New: -fsanitize=address catches out of bounds access on assumed size array only with -O0


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71027

            Bug ID: 71027
           Summary: -fsanitize=address catches out of bounds access on
                    assumed size array only with -O0
           Product: gcc
           Version: 7.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: zeccav at gmail dot com
  Target Milestone: ---

! -fsanitize=address -O0 catches out of bounds access on assumed size array
! any other optimization level, even -Og, inhibits catching
      dimension v(10)
      call sub(v)
      contains
      subroutine sub(vv)
      dimension vv(*)
      x=vv(20) ! out of bounds access
      end subroutine
      end

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