From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3887 invoked by alias); 8 Apr 2013 20:24:03 -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 3668 invoked by uid 48); 8 Apr 2013 20:24:00 -0000 From: "tkoenig at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/56867] Missing temporary with string array assignment Date: Mon, 08 Apr 2013 20:24: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: wrong-code X-Bugzilla-Severity: normal X-Bugzilla-Who: tkoenig 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/msg00684.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56867 --- Comment #6 from Thomas Koenig 2013-04-08 20:23:59 UTC --- I stumbled across this while looking at PR 30398, when I wanted to add some dependency checking to make call memcpy instead of memmove if there was no dependency. Look for an optimization, find a bug... I have been working on the idea to add an argument to gfc_trans_scalar_assign (which does not know about the gfc_expr*s any more) which indicates if there coul be a dependency, which could be checked via gfc_check_dependency and then passed to gfc_trans_string_copy. This kind of analysis could also be used in PR 56594 to create a temporary.