This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/56937] Unnecessarily temporary with array-vector assignments
- 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: Tue, 30 Apr 2013 12:35:49 +0000
- Subject: [Bug fortran/56937] Unnecessarily temporary with array-vector assignments
- Auto-submitted: auto-generated
- References: <bug-56937-4 at http dot gcc dot gnu dot org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56937
--- Comment #9 from Tobias Burnus <burnus at gcc dot gnu.org> 2013-04-30 12:35:49 UTC ---
(In reply to comment #8)
> > Currently, we do not support assigning values to variables
> > and then later using the values for dependency analysis.
> > ...
Well, as I wrote in comment 0: For assignments of the form
array(vec_idx) = array(vec_idx) + nonaliasing_expr
no temporary should be generated.
Namely: Both sides have the same vector_idx expression. The test case in
comment 0 is based on a real world test case which exactly uses one array
variable as index.
I think one could walk the an array constructor, but my feeling is that a
constructor is not the most common usage case in a real-world code. Thus, that
has lower priority.