Re: [PATCH] PR fortran/89943 -- BIND(C) procedures in submodules

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Re: [PATCH] PR fortran/89943 -- BIND(C) procedures in submodules

Steve Kargl
On Fri, Aug 02, 2019 at 05:30:07PM -0700, Steve Kargl wrote:

> The attached patch has been tested on x86_64-*-freebsd.
> There were no regressions.
>
> The patch suppresses error messages for function, subroutine,
> and entry statements if these appear in a submodule.  The
> interface declared in the module must match the interface in
> submodule (including the BIND(C) label).
>
> Ok to commit?
>
> 2019-08-02  Steven G. Kargl  <[hidden email].
>
> PR fortran/89943
> * decl.c (match_attr_spec): Whitespace.
>   (gfc_match_function_decl,gfc_match_entry,gfc_match_subroutine):
> Suppress BIND(C) error messages for declarations in a submodule.
> * symbol.c (gfc_add_is_bind_c): Ditto.
>

The portion of the patch in gfc_match_entry will be removed.
Upon closer inspection, an ENTRY statement is not allowed in
a module or submodule.

--
Steve