Fortran: Fixes for kind=4 characters strings [PR107266]
authorTobias Burnus <tobias@codesourcery.com>
Mon, 17 Oct 2022 16:15:16 +0000 (18:15 +0200)
committerTobias Burnus <tobias@codesourcery.com>
Mon, 17 Oct 2022 16:15:16 +0000 (18:15 +0200)
commit8950288333162caa68b85c71ed2d02f40976ddb9
tree20b2d8a10c970cca56a552c01bfc66782031a456
parent3bd5d9a28e1ce4d1615902397b5ad50909839d6d
Fortran: Fixes for kind=4 characters strings [PR107266]

PR fortran/107266

gcc/fortran/
* trans-expr.cc (gfc_conv_string_parameter): Use passed
type to honor character kind.
* trans-types.cc (gfc_sym_type): Honor character kind.
* trans-decl.cc (gfc_conv_cfi_to_gfc): Fix handling kind=4
character strings.

gcc/testsuite/
* gfortran.dg/char4_decl.f90: New test.
* gfortran.dg/char4_decl-2.f90: New test.
gcc/fortran/trans-decl.cc
gcc/fortran/trans-expr.cc
gcc/fortran/trans-types.cc
gcc/testsuite/gfortran.dg/char4_decl-2.f90 [new file with mode: 0644]
gcc/testsuite/gfortran.dg/char4_decl.f90 [new file with mode: 0644]