Unverified Commit bdb5b442 authored by jeanPerier's avatar jeanPerier Committed by GitHub
Browse files

[flang] Fix length handling in character kind implicit conversion (#74586)

When assigning to a whole allocatable, lowering is dealing with the
implicit conversion to preserve the RHS lower bounds. In case of
character KIND mismatch, the code was setting the new RHS length to the
one from the LHS, which is wrong for two reasons:
- no padding/truncation was actually done in the conversion
- the RHS length should anyway not be touched since the one from the
allocatable LHS may change to become the one of the RHS.

Update the code to preserve the RHS type length when materializing the
implicit character KIND conversion.
parent 9b154dad
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment