[flang-commits] [flang] [flang] GETUID runtime and lowering intrinsics (PR #71689)

David Truby via flang-commits flang-commits at lists.llvm.org
Thu Nov 9 09:03:38 PST 2023


================
@@ -0,0 +1,14 @@
+! RUN: bbc -emit-hlfir %s -o - | FileCheck %s
+
+! CHECK-LABEL: func.func @_QPall_args() {
+! CHECK:         %[[VAL_0:.*]] = fir.alloca i32 {bindc_name = "uid", uniq_name = "_QFall_argsEuid"}
+! CHECK:         %[[VAL_1:.*]]:2 = hlfir.declare %0 {uniq_name = "_QFall_argsEuid"} : (!fir.ref<i32>) -> (!fir.ref<i32>, !fir.ref<i32>)
+! CHECK:         %[[VAL_2:.*]] = fir.call @_FortranAGetUID() fastmath<contract> : () -> i32
+! CHECK:         hlfir.assign %[[VAL_2:.*]] to %[[VAL_1:.*]]#0 : i32, !fir.ref<i32>
+! CHECK:         return
+! CHECK:       }
+
+subroutine all_args()
+  integer :: uid
+  uid = getuid()
+end
----------------
DavidTruby wrote:

nit: add missing newline at the end of this file

https://github.com/llvm/llvm-project/pull/71689


More information about the flang-commits mailing list