[flang][openacc] Use OpenACC terminator instead of fir.unreachable after Stop stmt...
[llvm-project.git] / flang / test / Lower / return-statement.f90
blob66310754d7bf5a89494e119f99eaf22cbda3bbd5
1 ! RUN: bbc %s -o "-" -emit-fir | FileCheck %s
3 program basic
4 return
5 end program
7 ! CHECK-LABEL: func @_QQmain() attributes {fir.bindc_name = "basic"} {
8 ! CHECK: return
9 ! CHECK: }
11 subroutine sub1()
12 return
13 end
15 ! CHECK-LABEL: func @_QPsub1() {
16 ! CHECK: cf.br ^bb1
17 ! CHECK: ^bb1: // pred: ^bb0
18 ! CHECK: return
20 subroutine sub2()
21 goto 3
22 2 return
23 3 goto 2
24 end
26 ! CHECK-LABEL: func @_QPsub2() {
27 ! CHECK: cf.br ^bb2
28 ! CHECK: ^bb1: // pred: ^bb2
29 ! CHECK: cf.br ^bb3
30 ! CHECK: ^bb2: // pred: ^bb0
31 ! CHECK: cf.br ^bb1
32 ! CHECK: ^bb3: // pred: ^bb1
33 ! CHECK: return