[PATCH] PR fortran/89943 -- Duplicate BIND(c) allowed (?)

Steve Kargl sgk@troutmask.apl.washington.edu
Fri Oct 4 22:26:00 GMT 2019


The attached patch allows the declaration of a BIND(C)
module function or module subroutine to appear in a
submodule (see testcases).  Regression test was clean.
OK to commit?

Before a rubber stamped 'OK'.  I do NOT use submodules.
A submodule user needs to pipe up on the validity of
the patch.


2019-10-04  Steven G. Kargl  <kargl@gcc.gnu.org>

	PR fortran/89943
	decl.c (gfc_match_function_decl): Ignore duplicate BIND(C) for function
	declaration in submodule.
	(gfc_match_entry): Use temporary for locus, which allows removal of
	one gfc_error_now().
	(gfc_match_subroutine): Ignore duplicate BIND(C) for subroutine
	declaration in submodule.

2019-10-04  Steven G. Kargl  <kargl@gcc.gnu.org>

	PR fortran/89943
	* gfortran.dg/pr89943_1.f90: New test.
	* gfortran.dg/pr89943_2.f90: Ditto.

-- 
Steve
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pr89943.diff
Type: text/x-diff
Size: 4857 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20191004/6a3306eb/attachment.bin>


More information about the Fortran mailing list