]> gcc.gnu.org Git - gcc.git/commit
Bind(C): Fix type encodings in ISO_Fortran_binding.h
authorSandra Loosemore <sandra@codesourcery.com>
Thu, 8 Jul 2021 15:21:20 +0000 (08:21 -0700)
committerSandra Loosemore <sandra@codesourcery.com>
Wed, 28 Jul 2021 04:20:21 +0000 (21:20 -0700)
commitfef67987cf502fe322e92ddce22eea7ac46b4d75
treef04b9267351ae00bf804b17be9e75e66e1cbadb7
parent89b3c97eed75c1e7c492bc727e0016003c5809cc
Bind(C): Fix type encodings in ISO_Fortran_binding.h

ISO_Fortran_binding.h had many incorrect hardwired kind encodings in
the definitions of the CFI_type_* macros.  Additionally, not all
targets support all the defined type encodings, and the Fortran
standard requires those macros to have a negative value.

This patch changes ISO_Fortran_binding.h to use sizeof instead of
hard-coded sizes, and assembles it from fragments that reflect the
set of types supported by the target.

2021-07-22  Sandra Loosemore  <sandra@codesourcery.com>
    Tobias Burnus  <tobias@codesourcery.com>

libgfortran/
PR libfortran/101305
* ISO_Fortran_binding.h: Fix hard-coded sizes and split into...
* ISO_Fortran_binding-1-tmpl.h: New file.
* ISO_Fortran_binding-2-tmpl.h: New file.
* ISO_Fortran_binding-3-tmpl.h: New file.
* Makefile.am: Add rule for generating ISO_Fortran_binding.h.
Adjust pathnames to that file.
* Makefile.in: Regenerated.
* mk-kinds-h.sh: New file.
* runtime/ISO_Fortran_binding.c: Fix include path.
libgfortran/ISO_Fortran_binding-1-tmpl.h [moved from libgfortran/ISO_Fortran_binding.h with 66% similarity]
libgfortran/ISO_Fortran_binding-2-tmpl.h [new file with mode: 0644]
libgfortran/ISO_Fortran_binding-3-tmpl.h [new file with mode: 0644]
libgfortran/Makefile.am
libgfortran/Makefile.in
libgfortran/mk-kinds-h.sh
libgfortran/runtime/ISO_Fortran_binding.c
This page took 0.058372 seconds and 5 git commands to generate.