1 ! RUN: %python %S/test_errors.py %s %flang_fc1
2 ! Check for various alt return error conditions
4 SUBROUTINE TEST (N
, *, *)
7 INTEGER, DIMENSION(2) :: B
9 IF ( N
.EQ
. 1 ) RETURN 1
10 IF ( N
.EQ
. 2 ) RETURN 2
11 IF ( N
.EQ
. 3 ) RETURN 3
12 IF ( N
.EQ
. 4 ) RETURN N
13 IF ( N
.EQ
. 5 ) RETURN N
* N
14 IF ( N
.EQ
. 6 ) RETURN B(N
)
15 !ERROR: Must be a scalar value, but is a rank-1 array
16 IF ( N
.EQ
. 7 ) RETURN B
17 !ERROR: Must have INTEGER type, but is REAL(4)
18 IF ( N
.EQ
. 8 ) RETURN R
19 !ERROR: Must have INTEGER type, but is COMPLEX(4)
20 IF ( N
.EQ
. 9 ) RETURN Z