This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/48955] [4.6/4.7 Regression] Wrong result for array assignment due to missing temporary
- From: "burnus at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 11 May 2011 09:23:09 +0000
- Subject: [Bug fortran/48955] [4.6/4.7 Regression] Wrong result for array assignment due to missing temporary
- Auto-submitted: auto-generated
- References: <bug-48955-4@http.gcc.gnu.org/bugzilla/>
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.