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

anlauf at gcc dot gnu.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |anlauf at gcc dot gnu.org

--- Comment #3 from anlauf at gcc dot gnu.org ---
There are also other PRs with ICEs and array bounds violation which might
be fixed by turning warnings into errors.

The patch in comment#2 misses another pair of checks in check_dimension
that need to be adjusted, including the mixup Lower <-> Upper.

However, the resulting modification leads to regressions in the following
testcases:

gfortran.dg/bounds_check_3.f90
gfortran.dg/bounds_check_11.f90
gfortran.dg/goacc/subarrays.f95
gfortran.dg/gomp/map-1.f90

I think we need to know which kind of abuse of array indices we want to
accept for legacy code, of which there might be plenty in the wild.

Potential candidates where there should be no error, maybe even no warning:

- assumed-size arrays
- arrays whose last dimension is 1 (only for -std=legacy (?))

Reply via email to