re PR fortran/89943 (Submodule functions are not allowed to have C binding)
authorSteven G. Kargl <kargl@gcc.gnu.org>
Tue, 15 Oct 2019 00:28:47 +0000 (00:28 +0000)
committerSteven G. Kargl <kargl@gcc.gnu.org>
Tue, 15 Oct 2019 00:28:47 +0000 (00:28 +0000)
commit51992f15a7d9adce1016f8c31d37409e50d5797f
treecd85f6f26495f371540a1d2777fa9860283a8131
parent23605fec7a620884de1d134cdbb86b866d9514d1
re PR fortran/89943 (Submodule functions are not allowed to have C binding)

2019-10-14  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.  Implement at check for F2018 C1550.
(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.  Implement at check for F2018 C1550.

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

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

From-SVN: r276983
gcc/fortran/ChangeLog
gcc/fortran/decl.c
gcc/testsuite/ChangeLog
gcc/testsuite/gfortran.dg/pr89943_1.f90 [new file with mode: 0644]
gcc/testsuite/gfortran.dg/pr89943_2.f90 [new file with mode: 0644]
gcc/testsuite/gfortran.dg/pr89943_3.f90 [new file with mode: 0644]
gcc/testsuite/gfortran.dg/pr89943_4.f90 [new file with mode: 0644]