26 lines · plain
1! Tests for control-flow2 3! RUN: bbc -emit-fir -hlfir=false %s -o - | FileCheck %s4 5! check the lowering of a RETURN in the body of a SUBROUTINE6! CHECK-LABEL: one7subroutine one(a,b,c)8 d = 1.09 if (a .ne. b) then10 ! CHECK: call @_QPone_a11 call one_a(d)12 ! CHECK: cond_br %{{.*}}, ^bb[[TB:.*]], ^13 if (d .eq. 1.0) then14 ! CHECK-NEXT: ^bb[[TB]]:15 ! CHECK-NEXT: br ^bb[[EXIT:.*]]16 return17 endif18 else19 e = 4.020 call one_b(c,d,e)21 endif22 ! CHECK: ^bb[[EXIT]]:23 ! CHECK-NEXT: return24end subroutine one25 26