public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "drow at gcc dot gnu dot org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug debug/26475] New: tree-ssa loses line numbers for initializations Date: Sun, 26 Feb 2006 21:02:00 -0000 [thread overview] Message-ID: <bug-26475-3264@http.gcc.gnu.org/bugzilla/> (raw) Here's a simple testcase. Compile with -O2 and look at the -fdump-tree-all-lineno dumps: int foo (int); int bar (int a) { int ndir = 0; int b; b = foo (a); while (b--) ndir = foo (ndir); } Early on, the ndir = 0 assignment is marked for line 4. Then the 0 gets propogated into a phi without a line number, which ends up associated with the while loop (in a larger testcase, with the end of the instruction before the loop instead of the start of the loop - not sure why a difference). The original assignment is DCE'd. Then an exactly identical initialization is rematerialized (not surprising), and the closest line number we could find was the line number of the statement before the phi. Obviously stepping over this in GDB looks unnecessarily strange. Perhaps some PHI arguments could have line number information to be used on edges when coming out of SSA? FYI, original testcase comes from GDB's selftest.exp; we get a very surprising line number associated with the first real instruction. -- Summary: tree-ssa loses line numbers for initializations Product: gcc Version: 4.0.3 Status: UNCONFIRMED Severity: normal Priority: P3 Component: debug AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: drow at gcc dot gnu dot org GCC host triplet: x86_64-pc-linux-gnu http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26475
next reply other threads:[~2006-02-26 20:22 UTC|newest] Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top 2006-02-26 21:02 drow at gcc dot gnu dot org [this message] 2006-02-27 21:13 ` [Bug debug/26475] " drow at gcc dot gnu dot org 2008-02-10 14:51 ` [Bug debug/26475] tree-ssa loses line numbers for initializations (constants for PHIs) manu at gcc dot gnu dot org 2009-07-24 23:40 ` manu at gcc dot gnu dot org 2009-07-25 9:50 ` rguenth at gcc dot gnu dot org 2009-07-30 18:40 ` amacleod at redhat dot com
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-26475-3264@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).