From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31839 invoked by alias); 30 Apr 2013 12:35:52 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 31798 invoked by uid 48); 30 Apr 2013 12:35:49 -0000 From: "burnus at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/56937] Unnecessarily temporary with array-vector assignments Date: Tue, 30 Apr 2013 12:35:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: fortran X-Bugzilla-Keywords: missed-optimization X-Bugzilla-Severity: normal X-Bugzilla-Who: burnus at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 X-SW-Source: 2013-04/txt/msg02433.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56937 --- Comment #9 from Tobias Burnus 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.