Discussion:
[Patch, Fortran] PR 86116: Ambiguous generic interface not recognised
Janus Weil
2018-08-05 13:23:59 UTC
Permalink
Hi all,

the attached patch fixes PR 86116 by splitting up the function
'compare_type' into two variants: One that is used for checking
generic interfaces and operators (keeping the old name), and one that
is used for checking dummy functions and procedure pointer assignments
('compare_type_characteristics'). The latter calls the former, but
includes an additional check that must not be done when checking
generics.

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

Cheers,
Janus


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

PR fortran/86116
* interface.c (compare_type): Remove a CLASS/TYPE check.
(compare_type_characteristics): New function that behaves like the old
'compare_type'.
(gfc_check_dummy_characteristics, gfc_check_result_characteristics):
Call 'compare_type_characteristics' instead of 'compare_type'.

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

PR fortran/86116
* gfortran.dg/generic_34.f90: New test case.
Janus Weil
2018-08-14 08:09:44 UTC
Permalink
ping!
Post by Janus Weil
Hi all,
the attached patch fixes PR 86116 by splitting up the function
'compare_type' into two variants: One that is used for checking
generic interfaces and operators (keeping the old name), and one that
is used for checking dummy functions and procedure pointer assignments
('compare_type_characteristics'). The latter calls the former, but
includes an additional check that must not be done when checking
generics.
Regtests cleanly on x86_64-linux-gnu. Ok for trunk?
Cheers,
Janus
PR fortran/86116
* interface.c (compare_type): Remove a CLASS/TYPE check.
(compare_type_characteristics): New function that behaves like the old
'compare_type'.
Call 'compare_type_characteristics' instead of 'compare_type'.
PR fortran/86116
* gfortran.dg/generic_34.f90: New test case.
Fritz Reese
2018-08-14 14:15:56 UTC
Permalink
Looks OK to me.
ping!
Post by Janus Weil
Hi all,
the attached patch fixes PR 86116 by splitting up the function
'compare_type' into two variants: One that is used for checking
generic interfaces and operators (keeping the old name), and one that
is used for checking dummy functions and procedure pointer assignments
('compare_type_characteristics'). The latter calls the former, but
includes an additional check that must not be done when checking
generics.
Regtests cleanly on x86_64-linux-gnu. Ok for trunk?
Cheers,
Janus
PR fortran/86116
* interface.c (compare_type): Remove a CLASS/TYPE check.
(compare_type_characteristics): New function that behaves like the old
'compare_type'.
Call 'compare_type_characteristics' instead of 'compare_type'.
PR fortran/86116
* gfortran.dg/generic_34.f90: New test case.
Janus Weil
2018-08-14 19:12:46 UTC
Permalink
Post by Fritz Reese
Looks OK to me.
Thanks, Fritz. Committed as r263540.

Since this PR is a regression, it should probably be backported to the
release branches as well. However, I'll a wait a week or two with
that, in order to check for possible problems on trunk ...

Cheers,
Janus
Post by Fritz Reese
ping!
Post by Janus Weil
Hi all,
the attached patch fixes PR 86116 by splitting up the function
'compare_type' into two variants: One that is used for checking
generic interfaces and operators (keeping the old name), and one that
is used for checking dummy functions and procedure pointer assignments
('compare_type_characteristics'). The latter calls the former, but
includes an additional check that must not be done when checking
generics.
Regtests cleanly on x86_64-linux-gnu. Ok for trunk?
Cheers,
Janus
PR fortran/86116
* interface.c (compare_type): Remove a CLASS/TYPE check.
(compare_type_characteristics): New function that behaves like the old
'compare_type'.
Call 'compare_type_characteristics' instead of 'compare_type'.
PR fortran/86116
* gfortran.dg/generic_34.f90: New test case.
Loading...