Discussion:
[Patch, Fortran, F08] PR 45521: GENERIC resolution with ALLOCATABLE/POINTER and PROCEDURE
Janus Weil
2018-08-04 14:50:23 UTC
Permalink
Hi all,

this patch should finally fix up the last wrinkles of PR 45521, which
deals with disambiguating specific procedures in a generic interface
via the pointer/allocatable attributes of the arguments (legal in
F08).

For 'ordinary' generic interfaces this already works (cf.
'generic_correspondence'), but not for operator interfaces, which are
treated a bit differently (see 'gfc_compare_interfaces'). The patch
basically copies over the usage of 'compare_ptr_alloc' from
'generic_correspondence' to the relevant part of
'gfc_compare_interfaces'.

Regtests cleanly on x86_64-linux-gnu. Ok for trunk?

Cheers,
Janus


2018-08-04 Janus Weil <***@gcc.gnu.org>

PR fortran/45521
* interface.c (gfc_compare_interfaces): Apply additional
distinguishability criteria of F08 to operator interfaces.


2018-08-04 Janus Weil <***@gcc.gnu.org>

PR fortran/45521
* gfortran.dg/interface_assignment_6.f90: New test case.
Jerry DeLisle
2018-08-04 15:14:02 UTC
Permalink
Post by Janus Weil
Hi all,
this patch should finally fix up the last wrinkles of PR 45521, which
deals with disambiguating specific procedures in a generic interface
via the pointer/allocatable attributes of the arguments (legal in
F08).
For 'ordinary' generic interfaces this already works (cf.
'generic_correspondence'), but not for operator interfaces, which are
treated a bit differently (see 'gfc_compare_interfaces'). The patch
basically copies over the usage of 'compare_ptr_alloc' from
'generic_correspondence' to the relevant part of
'gfc_compare_interfaces'.
Regtests cleanly on x86_64-linux-gnu. Ok for trunk?
OK, and thanks for patch.

Jerry
Janus Weil
2018-08-04 15:38:04 UTC
Permalink
Post by Jerry DeLisle
Post by Janus Weil
Hi all,
this patch should finally fix up the last wrinkles of PR 45521, which
deals with disambiguating specific procedures in a generic interface
via the pointer/allocatable attributes of the arguments (legal in
F08).
For 'ordinary' generic interfaces this already works (cf.
'generic_correspondence'), but not for operator interfaces, which are
treated a bit differently (see 'gfc_compare_interfaces'). The patch
basically copies over the usage of 'compare_ptr_alloc' from
'generic_correspondence' to the relevant part of
'gfc_compare_interfaces'.
Regtests cleanly on x86_64-linux-gnu. Ok for trunk?
OK, and thanks for patch.
Thanks for the quick review, Jerry. Committed as r263308.

Cheers,
Janus

Loading...