------- Comment #16 from janus at gcc dot gnu dot org 2009-09-10 21:09 ------- Ok, here goes an extended patch which fixes the testsuite regressions:
Index: gcc/fortran/resolve.c =================================================================== --- gcc/fortran/resolve.c (revision 151596) +++ gcc/fortran/resolve.c (working copy) @@ -6958,7 +6958,6 @@ resolve_ordinary_assign (gfc_code *code, && (lhs->symtree->n.sym == (*rhsptr)->symtree->n.sym)) *rhsptr = gfc_get_parentheses (*rhsptr); - resolve_code (code, ns); return true; } @@ -7190,7 +7189,12 @@ resolve_code (gfc_code *code, gfc_namesp break; if (resolve_ordinary_assign (code, ns)) - goto call; + { + if (code->op == EXEC_COMPCALL) + goto compcall; + else + goto call; + } break; @@ -7241,6 +7245,7 @@ resolve_code (gfc_code *code, gfc_namesp break; case EXEC_COMPCALL: + compcall: resolve_typebound_call (code); break; The problem with the two failing test cases was that after my removal of the 'resolve_code' line, type-bound assignment operators were still being translated to generic TBP calls (EXPR_COMPCALL), but those were not resolved. For non-typebound operators there was already a mechanism in place, which would resolve the call that had been generated from an assignment statement (cf. the "goto call" in resolve_code). My patch simply makes this mechanism work for TBOs. Regtesting now. Will commit if successful (as the patch was already pre-approved by Paul). -- janus at gcc dot gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- AssignedTo|unassigned at gcc dot gnu |janus at gcc dot gnu dot org |dot org | Status|NEW |ASSIGNED Last reconfirmed|2009-09-04 09:47:56 |2009-09-10 21:09:46 date| | http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41242