re PR fortran/45435 (Automatically generate C interop interface blocks from C code)
authorThomas Koenig <tkoenig@gcc.gnu.org>
Tue, 1 Aug 2017 17:59:11 +0000 (17:59 +0000)
committerThomas Koenig <tkoenig@gcc.gnu.org>
Tue, 1 Aug 2017 17:59:11 +0000 (17:59 +0000)
commite655a6cc43e880b291b726394c1c6be6db461e89
treeae5f1937db6ee534a99d8620aff5982d4785e186
parent5cada901b548a5b02e18fe5d5d074c5d100a406d
re PR fortran/45435 (Automatically generate C interop interface blocks from C code)

2017-08-01  Thomas Koenig  <tkoenig@gcc.gnu.org>

PR fortran/45435
* lang.opt (fc-prototypes): Add option.
* gfortran.h (gfc_typespec): Add interop_kind to struct.
(gfc_dump_c_prototypes): Add prototype.
* decl.c (gfc_match_kind_spec): Copy symbol used for kind to typespec.
* parse.c (gfc_parse_file): Call gfc_dump_prototypes.
* dump-parse-tree.c (gfc_dump_c_prototypes): New function.
(type_return): New enum.
(get_c_type_name): New function.
(write_decl): New function.
(write_type): New function.
(write_variable): New function.
(write_proc): New function.
(write_interop_decl): New function.
* invoke.texi: Document -fc-prototypes.

From-SVN: r250791
gcc/fortran/ChangeLog
gcc/fortran/decl.c
gcc/fortran/dump-parse-tree.c
gcc/fortran/gfortran.h
gcc/fortran/invoke.texi
gcc/fortran/lang.opt
gcc/fortran/parse.c