2020-05-12 02:38:53 +08:00
|
|
|
! RUN: %S/test_errors.sh %s %t %f18
|
2019-03-26 15:33:03 +08:00
|
|
|
! Make sure arithmetic if expressions are non-complex numeric exprs.
|
|
|
|
|
|
|
|
INTEGER I
|
|
|
|
COMPLEX Z
|
|
|
|
LOGICAL L
|
|
|
|
INTEGER, DIMENSION (2) :: B
|
|
|
|
|
|
|
|
if ( I ) 100, 200, 300
|
|
|
|
100 CONTINUE
|
|
|
|
200 CONTINUE
|
|
|
|
300 CONTINUE
|
|
|
|
|
2019-03-27 09:03:33 +08:00
|
|
|
!ERROR: ARITHMETIC IF expression must not be a COMPLEX expression
|
2019-03-26 15:33:03 +08:00
|
|
|
if ( Z ) 101, 201, 301
|
|
|
|
101 CONTINUE
|
|
|
|
201 CONTINUE
|
|
|
|
301 CONTINUE
|
|
|
|
|
2019-03-27 09:03:33 +08:00
|
|
|
!ERROR: ARITHMETIC IF expression must be a numeric expression
|
2019-03-26 15:33:03 +08:00
|
|
|
if ( L ) 102, 202, 302
|
|
|
|
102 CONTINUE
|
|
|
|
202 CONTINUE
|
|
|
|
302 CONTINUE
|
|
|
|
|
2019-03-27 09:03:33 +08:00
|
|
|
!ERROR: ARITHMETIC IF expression must be a scalar expression
|
2019-03-26 15:33:03 +08:00
|
|
|
if ( B ) 103, 203, 303
|
|
|
|
103 CONTINUE
|
|
|
|
203 CONTINUE
|
|
|
|
303 CONTINUE
|
|
|
|
|
|
|
|
END
|