public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "tejohnson at google dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug rtl-optimization/57451] New: Incorrect debug ranges emitted for -freorder-blocks-and-partition -g
Date: Wed, 29 May 2013 14:55:00 -0000	[thread overview]
Message-ID: <bug-57451-4@http.gcc.gnu.org/bugzilla/> (raw)

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57451

            Bug ID: 57451
           Summary: Incorrect debug ranges emitted for
                    -freorder-blocks-and-partition -g
           Product: gcc
           Version: 4.8.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: rtl-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: tejohnson at google dot com

Created attachment 30214
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=30214&action=edit
pr49115.C

While fixing problems with -freorder-blocks-and-partition, I found that the
debug ranges being emitted for split functions with -g are incorrect and
leading to assembler errors. I've attached a simple reproducer
(gcc/testsuite/g++.dg/torture/pr49115.C). To reproduce:

$ g++ pr49115.C -O2 -o pr49115 -fprofile-generate
$ pr49115
$ g++ pr49115.C -O2 -o pr49115 -fprofile-use -g -freorder-blocks-and-partition

/tmp/ccStx78Y.s: Assembler messages:
/tmp/ccStx78Y.s:325: Error: can't resolve `.text.unlikely' {.text.unlikely
section} - `.LBB14' {.text.startup section}

The problem is hidden if the last compile step is changed to drop either -g or
-freorder-blocks-and-partition, or by adding -gdwarf-2 (which doesn't trigger
debug_range support).


             reply	other threads:[~2013-05-29 14:55 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-29 14:55 tejohnson at google dot com [this message]
2013-06-12 15:54 ` [Bug rtl-optimization/57451] " tejohnson at google dot com
2013-06-12 17:08 ` ccoutant at gcc dot gnu.org
2013-06-13  2:07 ` tejohnson at google dot com
2013-06-15 14:03 ` tejohnson at google dot com
2013-08-09 23:01 ` tejohnson at google dot com
2013-08-09 23:23 ` ccoutant at google dot com
2013-08-09 23:30 ` tejohnson at google dot com
2013-08-12 16:17 ` ccoutant at google dot com
2013-11-23  4:30 ` tejohnson at gcc dot gnu.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=bug-57451-4@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: link
Be 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).