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

anlauf at gcc dot gnu.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |diagnostic
   Last reconfirmed|                            |2020-10-16
     Ever confirmed|0                           |1
             Status|UNCONFIRMED                 |NEW
                 CC|                            |anlauf at gcc dot gnu.org

--- Comment #3 from anlauf at gcc dot gnu.org ---
Reduced testcase:

program test
  implicit none
  integer, parameter :: m=2, n=3
  real, allocatable  :: r(:,:)
  allocate (r(m,n))  
  write(*,*) r(m+1,:)
  write(*,*) r(m+1,1)
end

Looking at the tree dump, there are array bounds checks generated for both
dimensions in the latter write, but there are suspiciously looking checks
for dimension 2 for the first case (r(m+1,:)).

Reply via email to