[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,17 @@
+! Regression test for the follow-up to PR llvm/llvm-project#197092.
+!
+! At -O0 on the host (no OpenMP target-device compilation), a scalar-to-array
+! broadcast assignment must lower to a Fortran runtime call
+! (_FortranAAssign), not to an inline assignment loop. Lowering it inline
+! at -O0 caused -g line breakpoints to hit once per array element instead
+! of once.
+
+! RUN: %flang_fc1 -emit-fir -O0 %s -o - | FileCheck %s
----------------
eugeneepshteyn wrote:

Note: we prefer to emit HLFIR, unless it's absolutely necessary to emit FIR. (Besides, the directory for this test is `Lower/HLFIR` :-) 

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


More information about the flang-commits mailing list