http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48955
--- Comment #2 from Tobias Burnus <burnus at gcc dot gnu.org> 2011-05-11 09:06:30 UTC --- The obvious problem is that there is no temporary needed for either of the variable expressions on the right hand side - only for their combination. Thus, one needs to check whether as some point whether one part of the RHS expression is GFC_DEP_FORWARD while another part is GFC_DEP_BACKWARD. My impression is that one needs an additional argument to gfc_check_dependency of the type "gfc_reverse *reverse" and two local variables like gfc_reverse reverse1, reverse2; which one passes to gfc_check_dependency/gfc_dep_resolver, and - if "reverse" is not NULL, propagates it to the caller. Then, for operators, the reverse setting can be compared.