2011/8/7 Janus Weil <ja...@gcc.gnu.org>: > 2011/8/7 Thomas Koenig <tkoe...@netcologne.de>: >> Am 07.08.2011 12:56, schrieb Janus Weil: >>> >>> + /* Check string length. */ >>> + if (proc_target->result->ts.type == BT_CHARACTER >>> + && proc_target->result->ts.u.cl&& old_target->result->ts.u.cl >>> + && gfc_dep_compare_expr (proc_target->result->ts.u.cl->length, >>> + old_target->result->ts.u.cl->length) != >>> 0) >>> + { >>> + gfc_error ("Character length mismatch between '%s' at '%L' " >>> + "and overridden FUNCTION", proc->name,&where); >>> + return FAILURE; >>> + } >>> } >> >> Well, let's make this into (again, typing the patch directly into >> e-mail) >> >> [...] >> >> and then work on extending gfc_dep_compare_expr to return -3 for more cases. >> I can help with that. > > Alright then. How about this: I'll commit the attached verision of the > patch (including your suggestions), and we start messing with the > return values afterwards? Patch is regtested on > x86_64-unknown-linux-gnu. I hope the test case is sufficient for a > start. > > Cheers, > Janus > > > 2011-08-07 Janus Weil <ja...@gcc.gnu.org>
Sorry, completely forgot to mention Thomas in the ChangeLog. Of course this should be 2011-08-07 Janus Weil <ja...@gcc.gnu.org> Thomas Koenig <tkoe...@gcc.gnu.org> Cheers, Janus > > PR fortran/49638 > * dependency.c (are_identical_variables): For dummy arguments only > check for equal names, not equal symbols. > * interface.c (gfc_check_typebound_override): Add checking for rank > and character length. > > 2011-08-07 Janus Weil <ja...@gcc.gnu.org> > > PR fortran/49638 > * gfortran.dg/typebound_override_1.f90: New. >