fortran: Fixes a bug in ISO_Fortran_binding.c.
authorJerry DeLisle <jvdelisle@gcc.gnu.org>
Fri, 15 Jan 2021 21:48:42 +0000 (13:48 -0800)
committerJerry DeLisle <jvdelisle@gcc.gnu.org>
Fri, 15 Jan 2021 21:48:42 +0000 (13:48 -0800)
commitb90e4a97419ce91fd7c1628b5912e8f54bee3441
tree1807faef01186a476a9229245048bc0af4454eeb
parent9beb6d88effdab4209beb8bc5e4b8773317f1d33
fortran: Fixes a bug in ISO_Fortran_binding.c.

libgfortran/ChangeLog:

* runtime/ISO_Fortran_binding.c (CFI_establish): Fixed signed
  char arrays. Signed char or uint8_t arrays would cause
  crashes unless an element size is specified.

gcc/testsuite/ChangeLog:

* gfortran.dg/iso_fortran_binding_uint8_array.f90: New test.
* gfortran.dg/iso_fortran_binding_uint8_array_driver.c: New test.
gcc/testsuite/gfortran.dg/iso_fortran_binding_uint8_array.f90 [new file with mode: 0644]
gcc/testsuite/gfortran.dg/iso_fortran_binding_uint8_array_driver.c [new file with mode: 0644]
libgfortran/runtime/ISO_Fortran_binding.c