[flang][hlfir] Avoid expr buffer reuse when end_associate may cycle.
If end_associate may execute more times than the expr value producer, then it cannot take ownership of the expr buffer. Otherwise, it may result in double-free errors. Note that the LIT test exposes a different issue with fir.alloca inside the do-loop produced for hlfir.elemental. This may cause out-of-stack conditions in valid Fortran programs that are not expected to run out of stack. I will create an issue for this. Reviewed By: tblah Differential Revision: https://reviews.llvm.org/D155778
Loading
Please sign in to comment