[Patch] Fortran/OpenMP: Fix optional dummy procedures [PR99171]

Jakub Jelinek jakub@redhat.com
Mon Feb 22 12:10:12 GMT 2021


On Mon, Feb 22, 2021 at 01:06:56PM +0100, Tobias Burnus wrote:
> Normal dummy arguments get some additional redirection if they are
> OPTIONAL; however, that's not the case for dummy procedures.
> 
> That was shown by a simple 'procedure(), optional :: proc' example
> in the PR. – The fix is as simple.
> 
> However, I thought it still makes sense to test all combinations of
> procedure pointer (incl. c_funptr) with optional and pointer...
> 
> OK for mainline and GCC 10 (it is a 10/11 regression)?

Ok, thanks.

> gcc/fortran/ChangeLog:
> 
> 	PR fortran/99171
> 	* trans-openmp.c (gfc_omp_is_optional_argument): Regard optional
> 	dummy procs as nonoptional as no special treatment is needed.
> 
> libgomp/ChangeLog:
> 
> 	PR fortran/99171
> 	* testsuite/libgomp.fortran/dummy-procs-1.f90: New test.
> 
>  gcc/fortran/trans-openmp.c                         |   5 +-
>  .../testsuite/libgomp.fortran/dummy-procs-1.f90    | 393 +++++++++++++++++++++
>  2 files changed, 397 insertions(+), 1 deletion(-)

	Jakub



More information about the Gcc-patches mailing list