[Bug fortran/97039] -fbounds-check misses violation with slice of array but not an element

anthony.debeus at gmail dot com gcc-bugzilla@gcc.gnu.org
Thu Oct 15 23:00:23 GMT 2020


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

--- Comment #2 from Anthony M de Beus <anthony.debeus at gmail dot com> ---
Clarification for anyone confused, "correct" results by a fortran compiler with
bounds-checking enabled would include finding/checking incorrect bounds in
(deliberately) incorrect fortran code given in the illustrative example.  

Hence in the example given, the pgf90 v.20.7 compiler correctly identifies the
incorrect fortran code involving the array slice, whereas the gfortran compiler
only catches the second error in the code, involving a specific element, but
not the first error, involving a slice.


More information about the Gcc-bugs mailing list