1 !RUN: bbc -emit-hlfir -o - %s | FileCheck %s
3 !CHECK-LABEL: func.func @_QPunstructured1
4 !CHECK: fir.select %{{[0-9]+}} : i32 [{{.*}}, ^bb[[BLOCK3:[0-9]+]], {{.*}}, ^bb[[BLOCK4:[0-9]+]], {{.*}}, ^bb[[BLOCK5:[0-9]+]], {{.*}}, ^bb[[BLOCK1:[0-9]+]]]
6 !CHECK: cf.cond_br %{{[0-9]+}}, ^bb[[BLOCK2:[0-9]+]], ^bb[[BLOCK4]]
9 !CHECK: cf.br ^bb[[BLOCK3]]
10 !CHECK: ^bb[[BLOCK3]]:
11 !CHECK: %[[C10:[a-z0-9_]+]] = arith.constant 10 : i32
12 !CHECK: arith.addi {{.*}}, %[[C10]]
13 !CHECK: cf.br ^bb[[BLOCK4]]
14 !CHECK: ^bb[[BLOCK4]]:
15 !CHECK: %[[C100:[a-z0-9_]+]] = arith.constant 100 : i32
16 !CHECK: arith.addi {{.*}}, %[[C100]]
17 !CHECK: cf.br ^bb[[BLOCK5]]
18 !CHECK: ^bb[[BLOCK5]]:
19 !CHECK: %[[C1000:[a-z0-9_]+]] = arith.constant 1000 : i32
20 !CHECK: arith.addi {{.*}}, %[[C1000]]
22 subroutine unstructured1(j
, k
)
23 goto (11, 22, 33) j
-3 ! computed goto - an expression outside [1,3] is a nop