Dear Paul, Paul Richard Thomas:
A question for the standard aficianados: Are there other base object expressions that are legal?
I don't think so. (Ignoring RESHAPE, SPREAD etc., cf. PR 47505.)
Bootstrapped and regtested on FC9/x86_64 - OK for trunk?
OK. Thanks for the patch.
*************** resolve_ordinary_assign (gfc_code *code, *** 9208,9215 **** ! gfc_error ("Variable must not be polymorphic in assignment at %L", ! &lhs->where); --- 9208,9216 ---- ! gfc_error ("Variable must not be polymorphic in assignment at %L " ! "- check that there is a matching specific subroutine " ! "for '=' operator",&lhs->where);
I have to admit that I like the initial wording better - with "in assignment" changed to "in intrinsic assignment". (In F2008, I would even write: "Nonallocatable variable", but gfortran does not yet support allocatable with intrinsic assignments.)
(By the way, there is no matching defined assignment - no need for the users to check whether there is one; they only need to check why there is none ;-)
Tobias