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

maik.riechert at arcor dot de changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |maik.riechert at arcor dot de

--- Comment #3 from maik.riechert at arcor dot de ---
This seems to be the same as asked at https://stackoverflow.com/q/53163843.

The minimal example from there is:

program main
    implicit none

    real, dimension(:), allocatable :: arr

    allocate (arr(5))
    ! should fail, but happily writes out of bounds
    call foo(arr)

contains

subroutine foo(arr)
    real, dimension(10), intent(inout) :: arr

    arr(10) = 42
end subroutine

end program


I tested this with gfortran 8.2.0 and it doesn't trigger a runtime error.

Reply via email to