This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/71027] New: -fsanitize=address catches out of bounds access on assumed size array only with -O0
- From: "zeccav at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 09 May 2016 18:05:48 +0000
- Subject: [Bug fortran/71027] New: -fsanitize=address catches out of bounds access on assumed size array only with -O0
- Auto-submitted: auto-generated
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