14 lines · plain
1! RUN: bbc -emit-fir %s -o - | FileCheck --check-prefixes=CHECK %s2! RUN: %flang_fc1 -emit-fir %s -o - | FileCheck --check-prefixes=CHECK %s3 4! CHECK-LABEL: func @_QPtest_ierrno(5subroutine test_ierrno()6 integer :: i7 i = ierrno()8! CHECK: %[[VAL_0:.*]] = fir.alloca i32 {bindc_name = "i", uniq_name = "_QFtest_ierrnoEi"}9! CHECK: %[[VAL_1:.*]] = fir.declare %[[VAL_0]] {uniq_name = "_QFtest_ierrnoEi"} : (!fir.ref<i32>) -> !fir.ref<i32>10! CHECK: %[[VAL_2:.*]] = fir.call @_QPierrno() fastmath<contract> : () -> i3211! CHECK: fir.store %[[VAL_2]] to %[[VAL_1]] : !fir.ref<i32>12! CHECK: return13end subroutine test_ierrno14