[flang-commits] [flang] [flang][debug] Keep the bounds of variables in stack slots at -O0. (PR #229876)
via flang-commits
flang-commits at lists.llvm.org
Thu Oct 8 09:56:35 PDT 2026
================
@@ -2149,6 +2149,8 @@ void CompilerInvocation::setLoweringOptions() {
// Lower TRANSPOSE as a runtime call under -O0.
loweringOpts.setOptimizeTranspose(codegenOpts.OptimizationLevel > 0);
+ // Keep the bounds of variables in memory under -O0 for the debugger.
+ loweringOpts.setBoundsInStackSlots(codegenOpts.OptimizationLevel == 0);
----------------
jiel-nv wrote:
Would it be better to gate this on `-O0 -g` rather than plain `-O0`?
https://github.com/llvm/llvm-project/pull/229876
More information about the flang-commits
mailing list