public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "jan.kratochvil at redhat dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug debug/49906] New: wrong .debug_line for -O0 -g prologue skip
Date: Fri, 29 Jul 2011 21:09:00 -0000	[thread overview]
Message-ID: <bug-49906-4@http.gcc.gnu.org/bugzilla/> (raw)

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

           Summary: wrong .debug_line for -O0 -g prologue skip
           Product: gcc
           Version: 4.4.7
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: debug
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: jan.kratochvil@redhat.com
            Target: x86_64-unknown-linux-gnu


FAIL: gcc (GCC) 4.4.7 20110729 (prerelease)
FAIL: gcc (GCC) 4.5.4 20110729 (prerelease)
FAIL: gcc (GCC) 4.6.2 20110729 (prerelease)
FAIL: gcc (GCC) 4.7.0 20110728 (experimental)
-g
-------------------------------------------------------------------------------
static int i;
static void
f (void)
{
  for (;;)
    if (i++)
      break;
}
int main (void) { f (); return 0; }
-------------------------------------------------------------------------------
(gdb) break f
Breakpoint 1 at 0x40045a: file src12932.c, line 8.
(gdb) run
Breakpoint 1, f () at src12932.c:8
8    }
(gdb) print i
Actual:
$1 = 1
Expected:
$1 = 0
-------------------------------------------------------------------------------
Original GDB bugreport:
http://sourceware.org/bugzilla/show_bug.cgi?id=12932
-------------------------------------------------------------------------------
 Line Number Statements:
  Extended opcode 2: set Address to 0x400454
  Special opcode 8: advance Address by 0 to 0x400454 and Line by 3 to 4
  Special opcode 93: advance Address by 6 to 0x40045a and Line by 4 to 8
  Special opcode 17: advance Address by 1 to 0x40045b and Line by -2 to 6
-------------------------------------------------------------------------------
0000000000400454 <f>:
f():
/home/jkratoch/t/src12932.c:4
  400454:       55                      push   %rbp
  400455:       48 89 e5                mov    %rsp,%rbp
  400458:       eb 01                   jmp    40045b <f+0x7>
/home/jkratoch/t/src12932.c:8
  40045a:       90                      nop
/home/jkratoch/t/src12932.c:6
  40045b:       8b 05 17 04 20 00       mov    0x200417(%rip),%eax        #
600878 <i>
  400461:       85 c0                   test   %eax,%eax
  400463:       0f 95 c2                setne  %dl
  400466:       83 c0 01                add    $0x1,%eax
  400469:       89 05 09 04 20 00       mov    %eax,0x200409(%rip)        #
600878 <i>
  40046f:       84 d2                   test   %dl,%dl
  400471:       74 e7                   je     40045a <f+0x6>
/home/jkratoch/t/src12932.c:7
  400473:       90                      nop
/home/jkratoch/t/src12932.c:8
  400474:       5d                      pop    %rbp
  400475:       c3                      retq


             reply	other threads:[~2011-07-29 21:09 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-29 21:09 jan.kratochvil at redhat dot com [this message]
2014-02-05  9:44 ` [Bug debug/49906] " dominiq at lps dot ens.fr
2014-02-05  9:48 ` dominiq at lps dot ens.fr

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-49906-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).