[Patch, Fortran, OOP] PR 49638: [OOP] length parameter is ignored when overriding type bound character functions with constant length.

Thomas Koenig tkoenig@netcologne.de
Sat Aug 6 16:54:00 GMT 2011


Am 06.08.2011 18:16, schrieb Janus Weil:
>> without any regressions.  Can anybody think of a case where the names can be
>> >  identical, but the variables different?  (I can't).
> Well, I'd say this can only happen if both variables reside in
> different namespaces (i.e. different modules or procedures).
>

gfc_are_identical variables is only called from within 
gfc_dep_compare_expr.  It makes no sense to call this function
to compare expressions from different statements, unless one has 
carefully analyzed that no intervening assignment to the variables has 
taken place.  Comparing across namespaces makes even less sense.

So yes, I think it is enough if we compare the variable names, and
document this in a commtent.

 > I have to admit I'm not aware of all the cases that
 > 'gfc_dep_compare_expr' was intended for originally. I was only trying
 > to re-use it for checking overriding procedures, which seems to work
 > very well, except for the "variable names vs. symbols" issue. If you
 > tell me it's fine to only check for variable names everywhere, this is
 > of course fine.

Well,  I also wrote the function, so maybe I can claim a little bit of
authority here on the way it was originally meant to be ;-)

 > Btw, the fact that your patch has no regressions does not necessarily
 > mean that there are no cases where it could fail. It could just mean
 > that the testsuite does not cover these cases.

Of course.  However, when analysis and regression test agree, it is 
usually a good sign :-)







More information about the Gcc-patches mailing list