[flang-commits] [flang] [flang] Fix for runtime crash for huge local array (PR #205270)
via flang-commits
flang-commits at lists.llvm.org
Tue Jun 23 09:02:46 PDT 2026
https://github.com/jeanPerier requested changes to this pull request.
Moving locals to global memory just because they are big is not OK from a point of view or reentrancy.
There is a developer option `-mllvm -fstack-array-size=x` to move stack allocation of arrays of more than x elements to the heap (unless `-fstack-arrays` is specified, which is implied in Ofast).
Maybe it would be best to set this option to something smaller by default (and moving to a byte size threshold rather than element size), I would advise posting an RFC on discourse as people may have different opinions regarding the default of such values.
https://github.com/llvm/llvm-project/pull/205270
More information about the flang-commits
mailing list