Fortran : False positive for optional arguments PR95446
commit685d8dafb4a1cb29ee219ad7857614ff66a78022
authorMark Eggleston <markeggleston@gcc.gnu.org>
Mon, 1 Jun 2020 13:56:00 +0000 (1 14:56 +0100)
committerMark Eggleston <markeggleston@gcc.gnu.org>
Wed, 1 Jul 2020 14:39:16 +0000 (1 15:39 +0100)
treebb4a6081c39d2ca77c16b17a7b8c6463f0a5da9f
parent8461191b826654a30eaaa57257bcca8e548f11c2
Fortran  : False positive for optional arguments PR95446

Check that there is non-optional argument of the same rank in the
list of actual arguments.  If there is the warning is not required.

2020-07-01  Steven G. Kargl  <kargl@gcc.gnu.org>

gcc/fortran/

PR fortran/95446
* resolve.c (resolve_elemental_actual): Add code to check for
non-optional argument of the same rank.  Revise warning message
to refer to the Fortran 2018 standard.

2020-07-01  Mark Eggleston  <markeggleston@gcc.gnu.org>

gcc/testsuite/

PR fortran/95446
* gfortran.dg/elemental_optional_args_6.f90: Remove check
for warnings that were erroneously output.
* gfortran.dg/pr95446.f90: New test.
gcc/fortran/resolve.c
gcc/testsuite/gfortran.dg/elemental_optional_args_6.f90
gcc/testsuite/gfortran.dg/pr95446.f90 [new file with mode: 0644]