Hi Tobias, > GCC 4.7 added some additional checks for type-bound procedure overriding. > However, doing so it weakened the check whether the nonpass argument has the > same type. > > While for normal arguments, passing the parent type to an extended type is > fine, for overriding the type (of nonpass arguments) must be exactly the > same as in the original type.
in principle I think your idea to tighten up the type check by symmetrizing it is ok. However, I'm not sure if the place where you do it is the most preferable: I think it should rather go inside of check_dummy_characteristics (since any check for the dummy characteristics should include the 'strict' type check, and not only a check of type compatibility, cf. F08:12.3.2.2). Anyway, there already is a call to 'compare_type_rank' in 'check_dummy_characteristics'. So, you could either just symmetrize this, or alternatively use a double 'gfc_compare_types' and a separate check for the rank. Moreover, I think your current patch misses e.g. the assumed-type handling that is present in compare_type_rank. Cheers, Janus