[flang-commits] [flang] [flang] Restrict O0 hlfir.assign scalar-to-array inlining to OpenMP target device (PR #201774)
Eugene Epshteyn via flang-commits
flang-commits at lists.llvm.org
Fri Jun 5 05:29:48 PDT 2026
================
@@ -0,0 +1,18 @@
+! Regression test for PR llvm/llvm-project#197092 and its follow-up.
+!
+! When compiling for an OpenMP target device at -O0, a scalar-to-array
+! broadcast assignment inside a target region must still be inlined to
+! avoid emitting a _FortranAAssign runtime call (which internally uses
+! malloc/free) into GPU device code.
+
+! RUN: %flang_fc1 -emit-fir -O0 -fopenmp -fopenmp-is-target-device %s -o - \
----------------
eugeneepshteyn wrote:
Even in this directory for OpenMP testing, most test use `-emit-hlfir`. Unless you need to check something in FIR, please favor emitting HLFIR
https://github.com/llvm/llvm-project/pull/201774
More information about the flang-commits
mailing list