Break circular dependency between FIR dialect and utilities
[llvm-project.git] / flang / test / Semantics / if_arith02.f90
blobe20fd46f994c77841e87d3eb20dfec890167dbf4
1 ! RUN: %python %S/test_errors.py %s %flang_fc1
2 ! Check that only labels are allowed in arithmetic if statements.
3 ! TODO: Revisit error message "expected 'ASSIGN'" etc.
4 ! TODO: Revisit error message "expected one of '0123456789'"
6 ! TODO: BUG: Note that labels 500 and 600 do not exist and
7 ! ought to be flagged as errors. This oversight may be the
8 ! result of disabling semantic checking after syntax errors.
10 if ( A ) 500, 600, 600
11 100 CONTINUE
12 200 CONTINUE
13 300 CONTINUE
15 !ERROR: expected 'ASSIGN'
16 !ERROR: expected 'ALLOCATE ('
17 !ERROR: expected '=>'
18 !ERROR: expected '('
19 !ERROR: expected '='
20 if ( B ) A, 101, 301
21 101 CONTINUE
22 201 CONTINUE
23 301 CONTINUE
25 !ERROR: expected one of '0123456789'
26 if ( B ) 102, A, 302
27 102 CONTINUE
28 202 CONTINUE
29 302 CONTINUE
31 !ERROR: expected one of '0123456789'
32 if ( B ) 103, 103, A
33 103 CONTINUE
34 203 CONTINUE
35 303 CONTINUE
37 END