From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18305 invoked by alias); 11 Aug 2013 11:16:33 -0000 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 Received: (qmail 18268 invoked by uid 48); 11 Aug 2013 11:16:31 -0000 From: "jan.kratochvil at redhat dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug debug/58123] New: [4.8 Regression] debug line not tracked for last autovariable dtor Date: Sun, 11 Aug 2013 11:16:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: debug X-Bugzilla-Version: 4.8.2 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: jan.kratochvil at redhat dot com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter cf_gcctarget Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2013-08/txt/msg00592.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58123 Bug ID: 58123 Summary: [4.8 Regression] debug line not tracked for last autovariable dtor Product: gcc Version: 4.8.2 Status: UNCONFIRMED Severity: normal Priority: P3 Component: debug Assignee: unassigned at gcc dot gnu.org Reporter: jan.kratochvil at redhat dot com Target: x86_64-unknown-linux-gnu PASS: g++ (GCC) 4.7.3 20130221 (prerelease) - it did not generate separate line info for destructors at all FAIL: g++ (GCC) 4.8.2 20130811 (prerelease) FAIL: g++ (GCC) 4.9.0 20130811 (experimental) class C { public: C() {} ~C() {} int m() { return 0; } }; /* 7 */ int main() { /* 8 */ C a; /* 9 */ C b; /* 10 */ C c; /* 11 */ return a.m() + b.m() + c.m(); /* 12 */ } ---------------------------------------------------------------------------- g++-4.7: (gdb) start 8 /* 8 */ C a; (gdb) next 9 /* 9 */ C b; (gdb) next 10 /* 10 */ C c; (gdb) next 11 /* 11 */ return a.m() + b.m() + c.m(); (gdb) next 12 /* 12 */ } ---------------------------------------------------------------------------- g++-4.8: each destructor has its own .debug_line entry: (gdb) start 8 /* 8 */ C a; (gdb) next 9 /* 9 */ C b; (gdb) next 10 /* 10 */ C c; (gdb) next 11 /* 11 */ return a.m() + b.m() + c.m(); (gdb) next 10 /* 10 */ C c; (gdb) next 9 /* 9 */ C b; (gdb) next ################## Missing: /* 8 */ C a; 11 /* 11 */ return a.m() + b.m() + c.m(); (gdb) next 12 /* 12 */ } except for the last one: /home/jkratoch/t/example2.C:10 4005f7: 48 8d 45 ed lea -0x13(%rbp),%rax 4005fb: 48 89 c7 mov %rax,%rdi 4005fe: e8 2b 00 00 00 callq 40062e /home/jkratoch/t/example2.C:9 400603: 48 8d 45 ee lea -0x12(%rbp),%rax 400607: 48 89 c7 mov %rax,%rdi 40060a: e8 1f 00 00 00 callq 40062e /home/jkratoch/t/example2.C:11 ############################^^ here should be :8 40060f: 48 8d 45 ef lea -0x11(%rbp),%rax 400613: 48 89 c7 mov %rax,%rdi 400616: e8 13 00 00 00 callq 40062e ############################ Missing debug line for :11 or :12 here: 40061b: 89 d8 mov %ebx,%eax /home/jkratoch/t/example2.C:12 40061d: 48 83 c4 18 add $0x18,%rsp 400621: 5b pop %rbx 400622: 5d pop %rbp 400623: c3 retq Downstream user bugreport: https://bugzilla.redhat.com/show_bug.cgi?id=995804