aboutsummaryrefslogtreecommitdiff
path: root/libphobos
diff options
context:
space:
mode:
authorThomas Koenig <tkoenig@gcc.gnu.org>2025-01-08 17:06:31 +0100
committerThomas Koenig <tkoenig@gcc.gnu.org>2025-01-16 20:09:18 +0100
commitc158f36027c316aedaa7bde83ca28a3365721fce (patch)
treef30f26f5ce61c293865264e29f9921f4adee9346 /libphobos
parent7f8bb6498691cace5cced224bfc72d13724c9b82 (diff)
downloadgcc-c158f36027c316aedaa7bde83ca28a3365721fce.zip
gcc-c158f36027c316aedaa7bde83ca28a3365721fce.tar.gz
gcc-c158f36027c316aedaa7bde83ca28a3365721fce.tar.bz2
Allow CFI_cdesc_t in argument lists with -fc-prototypes.
This patch fixes and reorganizes dumping C prototypes. It makes the following changes: - BIND(C) types are now always output before any global symbols - CFI_cdesc_t is issued for assumed shape and assumed rank arguments. - BIND(C,NAME="...") entities were not always issued. gcc/fortran/ChangeLog: PR fortran/118359 * dump-parse-tree.cc (show_external_symbol): New function. (write_type): Add prototype, put in restrictions on what not to dump. (has_cfi_cdesc): New function. (need_iso_fortran_binding): New function. (gfc_dump_c_prototypes): Adjust to take only a file output. Add "#include <ISO_Fortran_binding.h" if CFI_cdesc_t is found. Traverse global namespaces to dump types and the globalsymol list to dump external symbols. (gfc_dump_external_c_prototypes): Traverse global namespaces. (get_c_type_name): Handle CFI_cdesc_t. (write_proc): Also pass array spec to get_c_type_name. * gfortran.h (gfc_dump_c_prototypes): Adjust prototype. * parse.cc (gfc_parse_file): Adjust call to gfc_dump_c_prototypes.
Diffstat (limited to 'libphobos')
0 files changed, 0 insertions, 0 deletions