[flang-commits] [flang] [flang] GETPID runtime and lower intrinsic implementation (PR #70442)

Kiran Chandramohan via flang-commits flang-commits at lists.llvm.org
Fri Oct 27 05:06:22 PDT 2023


================
@@ -0,0 +1,15 @@
+! RUN: bbc -emit-fir %s -o - | FileCheck %s
+
+! CHECK-LABEL: func.func @_QPall_args() {
+! CHECK:         %[[VAL_0:.*]] = fir.alloca i32 {bindc_name = "pid", uniq_name = "_QFall_argsEpid"}
+! CHECK:         %[[VAL_1:.*]] = fir.call @_FortranAGetPID() fastmath<contract> : () -> i32
+! CHECK:         fir.store %[[VAL_1:.*]] to %[[VAL_0:.*]] : !fir.ref<i32>
+! CHECK:         return
+! CHECK:       }
+
+subroutine all_args()
+  integer :: pid
+  pid = getpid()
+end
+
+
----------------
kiranchandramohan wrote:

Nit:The name of the test is probably better as `getpid.f90`. Possibly a typo.

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


More information about the flang-commits mailing list