Files
clang-p2996/flang/test/Lower/fail_image.f90
jeanPerier f35f863a88 [flang][NFC] Use hlfir=false and flang-deprecated-no-hlfir in legacy tests (#71957)
Patch 2/3 of the transition step 1 described in

https://discourse.llvm.org/t/rfc-enabling-the-hlfir-lowering-by-default/72778/7.

All the modified tests are still here since coverage for the direct
lowering to FIR was still needed while it was default. Some already have
an HLFIR version, some have not and will need to be ported in step 2
described in the RFC.

Note that another 147 lit tests use -emit-fir/-emit-llvm outputs but do
not need a flag since the HLFIR/no HLFIR output is the same for what is
being tested.
2023-11-13 09:14:05 +01:00

21 lines
656 B
Fortran

! RUN: bbc -emit-fir -hlfir=false -o - %s | FileCheck %s
! RUN: %flang_fc1 -emit-fir -flang-deprecated-no-hlfir %s -o - | FileCheck %s
! CHECK-LABEL: func @_QPfail_image_test
subroutine fail_image_test(fail)
logical :: fail
! CHECK: cond_br {{.*}}, ^[[BB1:.*]], ^[[BB2:.*]]
! CHECK: ^[[BB1]]:
if (fail) then
! CHECK: {{.*}} = fir.call @_FortranAFailImageStatement() {{.*}}: () -> none
! CHECK-NEXT: fir.unreachable
FAIL IMAGE
end if
! CHECK: ^[[BB2]]:
! CHECK-NEXT: br ^[[BB3:.*]]
! CHECK-NEXT: ^[[BB3]]
! CHECK-NEXT: return
return
end subroutine
! CHECK-LABEL: func private @_FortranAFailImageStatement() -> none attributes {fir.runtime}