Suppose I have the following code
IF (a.eq.0.or.M(a)) THEN
With an integer and M (1: 3) an array of booleans. If a is 0, then I expect the first test to catch it, and the second will never be evaluated. However, if I use the Intel fortran compiler and compile with
-check all
then I got a segmentation error. No error occurs without this debugging option. Is this standard behavior? For many languages, the manual explicitly states that for
IF (A.or.B) THEN
if A is true, then B is not evaluated. Is the Fortran standard explicitly a requirement for evaluating A and B, even if it does not affect the end result?
source share