[Bug fortran/49638] [OOP] length parameter is ignored when overriding type bound character functions with constant length.

janus at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Thu Aug 4 11:00:00 GMT 2011


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49638

--- Comment #11 from janus at gcc dot gnu.org 2011-08-04 10:59:18 UTC ---
(In reply to comment #10)
> (In reply to comment #9)
> > +      if (strcmp (e1->symtree->n.sym->name, e1->symtree->n.sym->name) != 0)
> 
> That can be done quicker as:
>    if (e1->symtree->n.sym->name == e1->symtree->n.sym->name)
> 
> well, not in the general case - but as long as "gfc_get_string" was used to
> obtain the value.

Can we be sure that this is the case? With the strcmp we should be on the safe
side.

And of course there is a typo above: One of the 'e1's should be an 'e2'!



More information about the Gcc-bugs mailing list