is valid this use of forall

lluvia_lists@lavabit.com lluvia_lists@lavabit.com
Wed May 29 14:06:00 GMT 2013


> To quote the Fortran 2008 standard (see second sentence):
> [...]
> That's violated by the following FORALL statement:
>
> integer :: a1(d), a2(d), b(d)
> !...
> b = 1
> !...
> forall (i=1:d) a1(b(i)) = a1(b(i)) + 1

I'm curious. Then, does it means that the standard claims "undefined
behavior" and the compiler has no responsability if the program arrives to
that state? In this case, could the compiler forze the program to abort at
that point? If it isn't legal, why is not better to stop execution of the
program so the user can know something was wrong?





More information about the Fortran mailing list