[Bug fortran/56937] Unnecessarily temporary with array-vector assignments

burnus at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Tue Apr 30 12:35:00 GMT 2013


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.



More information about the Gcc-bugs mailing list