]> git.ipfire.org Git - thirdparty/gcc.git/commit
backport: re PR fortran/90351 (-fc-prototypes does not dump prototypes for external...
authorThomas Koenig <tkoenig@gcc.gnu.org>
Thu, 9 May 2019 17:40:30 +0000 (17:40 +0000)
committerThomas Koenig <tkoenig@gcc.gnu.org>
Thu, 9 May 2019 17:40:30 +0000 (17:40 +0000)
commit10e4cdb5a794c2568b9a27949973d4d3c1933c5b
tree9f03a98c78d6fc64024cafbeebb86e0f250bd5ed
parent239b7733c55d2376778277444f6327fbd0a18b1b
backport: re PR fortran/90351 (-fc-prototypes does not dump prototypes for external procedures)

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

    Backport from trunk
    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: r271038
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