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

Reply via email to