https://gcc.gnu.org/bugzilla/show_bug.cgi?id=128776
Bug ID: 128776
Summary: gfc_is_simply_contiguous does not catch leading
element with an extent 1 array
Product: gcc
Version: 17.0
Status: UNCONFIRMED
Severity: enhancement
Priority: P3
Component: fortran
Assignee: unassigned at gcc dot gnu.org
Reporter: tkoenig at gcc dot gnu.org
Target Milestone: ---
Just found this while working on PR 40598.
For the test case
real, dimension (1,2) :: b
b(1,:) = 0.
end
gfc_is_simply_contiguous does not recognize the LHS as a contiguous array.
There are probably a few missed optimizations because of that.