Always use name from c_interop_kinds_table for -fc-prototypes.
authorThomas Koenig <tkoenig@gcc.gnu.org>
Sun, 19 Jul 2020 15:27:45 +0000 (17:27 +0200)
committerThomas Koenig <tkoenig@gcc.gnu.org>
Sun, 19 Jul 2020 15:27:45 +0000 (17:27 +0200)
commit2e1b25350aa96b3f5678a056d0b55bb323c452d9
tree412065965e273a9d2ea8e073ef297330306c8534
parent29e1039ca211c4e3f1053925eda0a81c57cbcb0c
Always use name from c_interop_kinds_table for -fc-prototypes.

When a user specified a KIND that was a parameter taking the value
of an iso_c_binding KIND, the code used the name of that parameter
to look up the type name.  Corrected by always looking it up in
the table of C interop kinds (which was previously done for
non-C-interop types, anyway).

gcc/fortran/ChangeLog:

PR fortran/96220
* dump-parse-tree.c (get_c_type_name): Always use the entries from
c_interop_kinds_table to find the correct C type.
gcc/fortran/dump-parse-tree.c