[flang][hlfir] Fix hlfir.set_length codegen
The bufferization pass was propagating the raw alloca storage (which may not allow to later retrieve the length) instead of the hlfir variable value (which is guaranteed to hold the character length). Fix this and makes packageBufferizedExpr "storage" argument and getBufferizedExprStorage return an hlfir::Entity to avoid similar error in the future (the caller of packageBufferizedExpr will have to think a bit when adding the explicit hlfir::Entity{} cast). Differential Revision: https://reviews.llvm.org/D148307
Loading
Please sign in to comment