From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18499 invoked by alias); 8 Aug 2012 11:14:06 -0000 Received: (qmail 18483 invoked by uid 22791); 8 Aug 2012 11:14:04 -0000 X-SWARE-Spam-Status: No, hits=-3.5 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00,TW_TM X-Spam-Check-By: sourceware.org Received: from localhost (HELO gcc.gnu.org) (127.0.0.1) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 08 Aug 2012 11:13:52 +0000 From: "rguenth at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/54200] New: copyrename generates wrong debuginfo Date: Wed, 08 Aug 2012 11:14:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: tree-optimization X-Bugzilla-Keywords: wrong-debug X-Bugzilla-Severity: normal X-Bugzilla-Who: rguenth at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: Message-ID: X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 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 X-SW-Source: 2012-08/txt/msg00429.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54200 Bug #: 54200 Summary: copyrename generates wrong debuginfo Classification: Unclassified Product: gcc Version: 4.8.0 Status: UNCONFIRMED Keywords: wrong-debug Severity: normal Priority: P3 Component: tree-optimization AssignedTo: unassigned@gcc.gnu.org ReportedBy: rguenth@gcc.gnu.org For gcc.target/i386/pad-10.c copyrename transforms foo2 (int z, int x) { int D.1754; : if (x_2(D) == 1) goto ; else goto ; : bar (); D.1754_4 = z_3(D); goto ; : D.1754_5 = x_2(D) + z_3(D); : # D.1754_1 = PHI return D.1754_1; } to foo2 (int z, int x) { : if (x_2(D) == 1) goto ; else goto ; : bar (); z_4 = z_3(D); goto ; : z_5 = x_2(D) + z_3(D); : # z_1 = PHI return z_1; } note the bogus stmts z_5 = x_2(D) + z_3(D); : # z_1 = PHI return z_1; which assign to z values different from the incoming parameter value. [the question is if copyrename is still useful now that we have VTA and will insert debug stmts for assignments to names we'd loose over a copyprop/dce combo]