Fortran: diagnostics for actual arguments to pointer dummy arguments [PR94104]
authorJosé Rui Faustino de Sousa <jrfsousa@gmail.com>
Wed, 9 Nov 2022 20:30:25 +0000 (21:30 +0100)
committerHarald Anlauf <anlauf@gmx.de>
Sun, 13 Nov 2022 20:19:18 +0000 (21:19 +0100)
commit58e7732a2feddf475e72b232bf16494d84a41acf
treed006a24299c75d0b49ee8e1f822046e7dfca0580
parente42b672f5297594fff4b82064c5386fbb0ae1ff3
Fortran: diagnostics for actual arguments to pointer dummy arguments [PR94104]

Error message improvement.  In Fortran 2008 actual procedure arguments
associated with a pointer, intent(in) attribute, dummy argument
can also have the target attribute, not just pointer.

gcc/fortran/ChangeLog:

PR fortran/94104
* interface.cc (gfc_compare_actual_formal): Improve error message
dependent on Fortran standard level.

gcc/testsuite/ChangeLog:

PR fortran/94104
* gfortran.dg/parens_2.f90: Adjust to improved error message.
* gfortran.dg/PR94104a.f90: New test.
* gfortran.dg/PR94104b.f90: New test.
gcc/fortran/interface.cc
gcc/testsuite/gfortran.dg/PR94104a.f90 [new file with mode: 0644]
gcc/testsuite/gfortran.dg/PR94104b.f90 [new file with mode: 0644]
gcc/testsuite/gfortran.dg/parens_2.f90