]> git.ipfire.org Git - thirdparty/gcc.git/commit
Fortran: Fixes for F2018 C838 (PR fortran/101334)
authorSandra Loosemore <sandra@codesourcery.com>
Mon, 20 Sep 2021 00:32:03 +0000 (17:32 -0700)
committerSandra Loosemore <sandra@codesourcery.com>
Thu, 23 Sep 2021 00:10:57 +0000 (17:10 -0700)
commit7a40f2e74815a926c5f47416c29efbc17aa1ef43
tree238a5383e85a53e0a48351506c0a2fc9aeb8106e
parent8fa9e73e6db0ff05447f5547df925fdcb4733d05
Fortran: Fixes for F2018 C838 (PR fortran/101334)

The compiler was failing to diagnose the error required by F2018 C838
when passing an assumed-rank array argument to a non-assumed-rank dummy.
It was also incorrectly giving an error for calls to the 2-argument form
of the ASSOCIATED intrinsic, which is supposed to be permitted by C838.

2021-09-19  Sandra Loosemore  <sandra@codesourcery.com>

PR fortran/101334

gcc/fortran/
* check.c (gfc_check_associated): Allow an assumed-rank
array for the pointer argument.
* interface.c (compare_parameter): Also give rank mismatch
error on assumed-rank array.

gcc/testsuite/
* gfortran.dg/c-interop/c535b-2.f90: Remove xfails.
* gfortran.dg/c-interop/c535b-3.f90: Likewise.
gcc/fortran/check.c
gcc/fortran/interface.c
gcc/testsuite/gfortran.dg/c-interop/c535b-2.f90
gcc/testsuite/gfortran.dg/c-interop/c535b-3.f90