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.
35 lines
667 B
Fortran
35 lines
667 B
Fortran
! RUN: bbc %s -o "-" -emit-fir -hlfir=false | FileCheck %s
|
|
|
|
program basic
|
|
return
|
|
end program
|
|
|
|
! CHECK-LABEL: func @_QQmain() attributes {fir.bindc_name = "basic"} {
|
|
! CHECK: return
|
|
! CHECK: }
|
|
|
|
subroutine sub1()
|
|
return
|
|
end
|
|
|
|
! CHECK-LABEL: func @_QPsub1() {
|
|
! CHECK: cf.br ^bb1
|
|
! CHECK: ^bb1: // pred: ^bb0
|
|
! CHECK: return
|
|
|
|
subroutine sub2()
|
|
goto 3
|
|
2 return
|
|
3 goto 2
|
|
end
|
|
|
|
! CHECK-LABEL: func @_QPsub2() {
|
|
! CHECK: cf.br ^bb2
|
|
! CHECK: ^bb1: // pred: ^bb2
|
|
! CHECK: cf.br ^bb3
|
|
! CHECK: ^bb2: // pred: ^bb0
|
|
! CHECK: cf.br ^bb1
|
|
! CHECK: ^bb3: // pred: ^bb1
|
|
! CHECK: return
|
|
|