This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug fortran/48955] [4.6/4.7 Regression] Wrong result for array assignment due to missing temporary


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]