https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91584
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2019-08-29
CC| |msebor at gcc dot gnu.org
Component|fortran |middle-end
Ever confirmed|0 |1
--- Comment #2 from Richard Biener <rguenth at gcc dot gnu.org> ---
There's nothing C specific about -Warray-bounds, it might be simply a bug ;)
The issue is that vrp_prop::check_mem_ref looks at the decl in MEM[&decl],
failing to account for the index-shift created by the MEM_REFs type
(domain [0, ...]) vs. the decls domain [1, ...]. Or simply by failing to
subtract the domain min value from arrbounds[] (there's no ARRAY_REF
here, so I wonder what it checks...).
Martin?