Break circular dependency between FIR dialect and utilities
[llvm-project.git] / flang / test / Semantics / computed-goto02.f90
blobf613404af3da27797889123d956d4334b2bf777e
1 ! RUN: %python %S/test_errors.py %s %flang_fc1
2 ! Check that computed goto express must be a scalar integer expression
3 ! TODO: PGI, for example, accepts a float & converts the value to int.
5 REAL R
6 COMPLEX Z
7 LOGICAL L
8 INTEGER, DIMENSION (2) :: B
10 !ERROR: Must have INTEGER type, but is REAL(4)
11 GOTO (100) 1.5
12 !ERROR: Must have INTEGER type, but is LOGICAL(4)
13 GOTO (100) .TRUE.
14 !ERROR: Must have INTEGER type, but is REAL(4)
15 GOTO (100) R
16 !ERROR: Must have INTEGER type, but is COMPLEX(4)
17 GOTO (100) Z
18 !ERROR: Must be a scalar value, but is a rank-1 array
19 GOTO (100) B
21 100 CONTINUE
23 END