]> gcc.gnu.org Git - gcc.git/commit
Fortran: fix ICE and wrong code with TRANSFER and CHARACTER(kind=4)
authorHarald Anlauf <anlauf@gmx.de>
Tue, 11 Jan 2022 21:06:10 +0000 (22:06 +0100)
committerHarald Anlauf <anlauf@gmx.de>
Sat, 15 Jan 2022 21:33:00 +0000 (22:33 +0100)
commit29401b7b4581e9131e7057e263dcea8b40a6b5ab
tree917d638c4ccbbc5954b59edb18a6967f74d49ba2
parent52d28210389ff3d4af8f20db4db1f0d58b0f8eff
Fortran: fix ICE and wrong code with TRANSFER and CHARACTER(kind=4)

gcc/fortran/ChangeLog:

PR fortran/83079
* target-memory.c (gfc_interpret_character): Result length is
in bytes and thus depends on the character kind.
* trans-intrinsic.c (gfc_conv_intrinsic_transfer): Compute correct
string length for the result of the TRANSFER intrinsic and for
temporaries for the different character kinds.

gcc/testsuite/ChangeLog:

PR fortran/83079
* gfortran.dg/transfer_char_kind4.f90: New test.
gcc/fortran/target-memory.c
gcc/fortran/trans-intrinsic.c
gcc/testsuite/gfortran.dg/transfer_char_kind4.f90 [new file with mode: 0644]
This page took 0.071055 seconds and 6 git commands to generate.