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