[LoopReroll] Add an extra defensive check to avoid SCEV assertion.
[llvm-project.git] / flang / test / Semantics / if_arith02.f90
blob95af99978dc5f008088406f972d78dfb31c558f8
1 ! RUN: %S/test_errors.sh %s %t %flang_fc1
2 ! REQUIRES: shell
3 ! Check that only labels are allowed in arithmetic if statements.
4 ! TODO: Revisit error message "expected 'ASSIGN'" etc.
5 ! TODO: Revisit error message "expected one of '0123456789'"
7 ! TODO: BUG: Note that labels 500 and 600 do not exist and
8 ! ought to be flagged as errors. This oversight may be the
9 ! result of disabling semantic checking after syntax errors.
11 if ( A ) 500, 600, 600
12 100 CONTINUE
13 200 CONTINUE
14 300 CONTINUE
16 !ERROR: expected 'ASSIGN'
17 !ERROR: expected 'ALLOCATE ('
18 !ERROR: expected '=>'
19 !ERROR: expected '('
20 !ERROR: expected '='
21 if ( B ) A, 101, 301
22 101 CONTINUE
23 201 CONTINUE
24 301 CONTINUE
26 !ERROR: expected one of '0123456789'
27 if ( B ) 102, A, 302
28 102 CONTINUE
29 202 CONTINUE
30 302 CONTINUE
32 !ERROR: expected one of '0123456789'
33 if ( B ) 103, 103, A
34 103 CONTINUE
35 203 CONTINUE
36 303 CONTINUE
38 END