On Friday 05 August 2011 19:30:49 Janus Weil wrote: > Hi Mikael, > > >> The extra > >> argument controls whether we check variable symbols for equality or > >> just their names. For the overriding checks it is sufficient to check > >> for names, because the arguments of the overriding procedure are > >> required to have the same names as in the base procedure. > > > > Unless you extend the flag thing to all the children function of > > gfc_dep_compare_expr (there are zillions of them), it is preferable IMO > > to make the diagnostic a warning, as identical expressions could be > > missed. > > Well, it would not be really satisfying to degrade the error to a > warning, knowing it may be wrong sometimes. So I think one should > rather fix this, which I think is not as hard as you suggest: > gfc_dep_compare_expr doesn't exactly have "zillions" of children, but > just two AFAICS: > > * gfc_are_identical_variables gfc_are_identical_variables pulls in identical_array_ref too. identical_array_ref can pull check_section_vs_section which needs gfc_is_same_range. ;-)
> * gfc_dep_compare_functions > > Apart from those two, it is highly recursive and mostly calls itself, > where the argument is passed on already. Yes, OK there are not zillions of them (I thought almost all of dependency.c was pulled in). > So I think it's feasible to > add the extra argument to the above two functions, too (unless anyone > has a better idea). I still think that there could be some other cases that gfc_dep_compare_expr could possibly miss; but they are corner cases if functions and variables refs are handled, so an error is IMO OK then. We can wait a bug report to popup about it before deciding to downgrade to a warning. Mikael