Skip to content
Unverified Commit 7a4570ac authored by jeanPerier's avatar jeanPerier Committed by GitHub
Browse files

[flang] sanitize set_length in lowering (#80412)

In fortran, it is possible to give a negative "i" in "character(i)" in
which case the standard says the length is zero. So the length must be
sanitized as max(0, user_input) in lowering.

This is already done when lowering specification parts, but was not done
when "character(i)" appears in array constructors. Sanitize the length
when lowering SetLength in lowering.

Fixes https://github.com/llvm/llvm-project/issues/80270
parent c66cedb3
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment