re PR fortran/90351 (-fc-prototypes does not dump prototypes for external procedures)
authorThomas Koenig <tkoenig@gcc.gnu.org>
Wed, 8 May 2019 21:55:13 +0000 (21:55 +0000)
committerThomas Koenig <tkoenig@gcc.gnu.org>
Wed, 8 May 2019 21:55:13 +0000 (21:55 +0000)
commit6328ce1f83c260ac7728f9490870c326944b17d8
tree6b41257889c17529a03ad9bc8a581c7080a3a748
parent8ba2bda8e4b4276770901b720dee4f3d297dda3c
re PR fortran/90351 (-fc-prototypes does not dump prototypes for external procedures)

2019-05-08  Thomas Koenig  <tkoenig@gcc.gnu.org>

    PR fortran/90351
    PR fortran/90329
    * gfortran.dg/dump-parse-tree.c: Include version.h.
    (gfc_dump_external_c_prototypes): New function.
    (get_c_type_name): Select "char" as a name for a simple char.
    Adjust to handling external functions. Also handle complex.
    (write_decl): Add argument bind_c. Adjust for dumping of external
    procedures.
    (write_proc): Likewise.
    (write_interop_decl): Add bind_c argument to call of write_proc.
    * gfortran.h: Add prototype for gfc_dump_external_c_prototypes.
    * lang.opt: Add -fc-prototypes-external flag.
    * parse.c (gfc_parse_file): Move dumping of BIND(C) prototypes.
    Call gfc_dump_external_c_prototypes if option is set.
    * invoke.texi: Document -fc-prototypes-external.

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