In 22.214.171.124 of the draft F2003 standard ("Type-bound procedure overriding") a list of conditions is given that an overriding type-bound procedure must satisfy; the checks that function result characteristics and characteristics of corresponding dummy arguments are the same are incomplete in the current implementation. This corresponds to two FIXME's in resolve.c / check_typebound_overrid.
At the moment, only gfc_compare_types is called; among the items that fail to be checked are rank, array shape (if known), ALLOCATABLE/POINTER attributes and INTENT declarations.
(In reply to comment #0)
> At the moment, only gfc_compare_types is called; among the items that fail to
> be checked are rank, array shape (if known), ALLOCATABLE/POINTER attributes and
> INTENT declarations.
There are a few related PRs:
* for the INTENT check there is PR47978
* PR35831 concerns the shape check (originally for dummy procedure arguments, but it applies to TBP overriding in the same way)
This PR can be used to track some of the missing checks:
* string length
(In reply to comment #1)
> This PR can be used to track some of the missing checks:
> * ALLOCATABLE/POINTER
> * string length
> * ...
http://gcc.gnu.org/viewcvs?view=revision&revision=178767 fixes already most of this, but there are at least three FIXMEs left in 'check_dummy_characteristics'.
Basically all the checks in this area have been fixed by now.
One of the last todo items is a carry-over from PR 35831:
* improve gfc_dep_compare_expr to catch more cases (and/or enable the warnings in check_result_characteristics and check_dummy_characteristics, marked by FIXMEs)