[PATCH] PR fortran/83079 - ICE and wrong code with TRANSFER and character(kind=4)
Harald Anlauf
anlauf@gmx.de
Tue Jan 11 21:17:12 GMT 2022
Dear Fortranners,
when digging into the issue pointed out in the PR by Gerhard it turned
out that there were several issues with the TRANSFER intrinsics in the
case MOLD was CHARACTER(kind=4). Default CHARACTER was fine, though.
- the size of the result was wrongly calculated
- the string length used in temporaries was wrong
- the result characteristics was wrong
Fortunately, the few fixes were very local and needed only fix-ups of
the respective computations.
Since the details of which issue would show up seemed to depend on the
properties of a the arguments to TRANSFER, I wrote an extended testcase
which is a "hull" of what I used in debugging.
(The testcase was and can be cross-checked with the NAG compiler.)
Regtested on x86_64-pc-linux-gnu. OK for mainline?
Thanks,
Harald
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Fortran-fix-ICE-and-wrong-code-with-TRANSFER-and-CHA.patch
Type: text/x-patch
Size: 8385 bytes
Desc: not available
URL: <https://gcc.gnu.org/pipermail/fortran/attachments/20220111/73c23b66/attachment-0001.bin>
More information about the Fortran
mailing list