[flang-commits] [flang] [flang] handle alloca outside of entry blocks in MemoryAllocation (PR #98457)

via flang-commits flang-commits at lists.llvm.org
Mon Jul 15 03:03:29 PDT 2024


jeanPerier wrote:

> All builds and tests correctly. But this change is supposed to fix #88344. But after building flang-new with these changes, the example program in that issue still gets a seg fault in the same place.

Did you use the `-mmlir -fdynamic-heap-array` switch?

#88344 test is expected to segfault with limited stacks given flang is doing stack allocation by default in many cases (the test needs a huge temp). The bug was that `-mmlir -fdynamic-heap-array`  (which place stack temps on the heap) did not fix the situation. It does for me now (well, I did not wait for the reproducer to terminate, it is a torture test that does 100 billion multiplications and 10 million dynamic allocations.... but without the `-fdynamic-heap-array` option it crashes after a few seconds only).

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


More information about the flang-commits mailing list