Bind(c): signed char is not a Fortran character type
authorSandra Loosemore <sandra@codesourcery.com>
Thu, 22 Jul 2021 22:15:50 +0000 (15:15 -0700)
committerSandra Loosemore <sandra@codesourcery.com>
Thu, 22 Jul 2021 22:15:50 +0000 (15:15 -0700)
commite4966e1d1de54441bdaed54eb00084db4193bbbf
tree0929fed109a5b2666daf0becc111f5f2d15600ae
parent8ed6cfbbee74ec9e03f2558b9c36f61dd7d4dcfd
Bind(c): signed char is not a Fortran character type

CFI_allocate and CFI_select_part were incorrectly treating
CFI_type_signed_char as a Fortran character type for the purpose of
deciding whether or not to use the elem_len argument.  It is a Fortran
integer type per table 18.2 in the 2018 Fortran standard.

Other functions in ISO_Fortran_binding.c appeared to handle this case
correctly already.

2021-07-15  Sandra Loosemore  <sandra@codesourcery.com>

libgfortran/
* runtime/ISO_Fortran_binding.c (CFI_allocate): Don't use elem_len
for CFI_type_signed_char.
(CFI_select_part): Likewise.
libgfortran/runtime/ISO_Fortran_binding.c