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

--- Comment #4 from Lorenz Hüdepohl <bugs at stellardeath dot org> ---
> The right way to fix the problem is to fix the program
> by using an appropriate programming style.  Writing
>
>      real    :: a(n1:)   ! not:  real :: a(n1:n2)
>
> one gets the expected check

I realize that, and when I write my own code I would never
use such a construction. However, sometimes one is burdened
with existing code in which small treasures such as this kind
of bug are hidden.

I was hoping that with -fcheck=bounds I could find this.

If the code was correct already there would be no need for
any kind of runtime checks, right?

Reply via email to