Break circular dependency between FIR dialect and utilities
[llvm-project.git] / flang / test / Lower / fail_image.f90
blob3f9aad3fd984edf360d640950de7205b94370362
1 ! RUN: bbc -emit-fir -o - %s | FileCheck %s
2 ! RUN: %flang_fc1 -emit-fir %s -o - | FileCheck %s
4 ! CHECK-LABEL: func @_QPfail_image_test
5 subroutine fail_image_test(fail)
6 logical :: fail
7 ! CHECK: cond_br {{.*}}, ^[[BB1:.*]], ^[[BB2:.*]]
8 ! CHECK: ^[[BB1]]:
9 if (fail) then
10 ! CHECK: {{.*}} = fir.call @_FortranAFailImageStatement() {{.*}}: () -> none
11 ! CHECK-NEXT: fir.unreachable
12 FAIL IMAGE
13 end if
14 ! CHECK: ^[[BB2]]:
15 ! CHECK-NEXT: br ^[[BB3:.*]]
16 ! CHECK-NEXT: ^[[BB3]]
17 ! CHECK-NEXT: return
18 return
19 end subroutine
20 ! CHECK-LABEL: func private @_FortranAFailImageStatement() -> none attributes {fir.runtime}