public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "jakub at gcc dot gnu dot org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug debug/44205] Wrong .debug_line for -O0 -g Date: Thu, 20 May 2010 14:44:00 -0000 [thread overview] Message-ID: <20100520144429.3695.qmail@sourceware.org> (raw) In-Reply-To: <bug-44205-12292@http.gcc.gnu.org/bugzilla/> ------- Comment #2 from jakub at gcc dot gnu dot org 2010-05-20 14:44 ------- Created an attachment (id=20711) --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=20711&action=view) gcc46-pr44205.patch Doing it at gimplification time would be actually very hard, we only create the continue label after then block is gimplified and only if it could fall through. Here is an attempt to fix this by removing forwarder blocks even at -O0 during tree cfg cleanup if they don't care any useful location info (either everything is UNKNOWN_LOCATION as in this testcase, or everything has the same location). The goto to the cont label intentionally has no location: g = gimple_build_goto (label_cont); /* GIMPLE_COND's are very low level; they have embedded gotos. This particular embedded goto should not be marked with the location of the original COND_EXPR, as it would correspond to the COND_EXPR's condition, not the ELSE or the THEN arms. To avoid marking it with the wrong location, flag it as "no location". */ gimple_set_do_not_emit_location (g); and nothing else on the edges here has any locus either, so I believe nothing is lost by removing the forwarder block. We then avoid removing the forwarder block at RTL cleanup time when the extra jump already has some, in this case undesirable, location. This patch definitely needs testing on gdb testsuite if it doesn't regress anything at -O0 -g. -- jakub at gcc dot gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- AssignedTo|unassigned at gcc dot gnu |jakub at gcc dot gnu dot org |dot org | Status|UNCONFIRMED |ASSIGNED http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44205
next prev parent reply other threads:[~2010-05-20 14:44 UTC|newest] Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top 2010-05-19 22:49 [Bug debug/44205] New: " jan dot kratochvil at redhat dot com 2010-05-20 13:27 ` [Bug debug/44205] " jakub at gcc dot gnu dot org 2010-05-20 14:44 ` jakub at gcc dot gnu dot org [this message] 2010-05-20 16:04 ` jan dot kratochvil at redhat dot com 2010-05-21 9:27 ` jakub at gcc dot gnu dot org 2010-05-21 9:28 ` jakub at gcc dot gnu dot org 2010-05-21 9:30 ` jakub at gcc dot gnu dot org 2010-05-21 9:35 ` [Bug debug/44205] [4.4/4.5/4.6 Regression] " jakub at gcc dot gnu dot org
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=20100520144429.3695.qmail@sourceware.org \ --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).