public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug debug/55794] New: g++.dg/debug/dwarf2/non-virtual-thunk.C -std=gnu++98 and -std=gnu++11
@ 2012-12-22 20:12 danglin at gcc dot gnu.org
  2013-01-22 17:37 ` [Bug debug/55794] FAIL: " janis at gcc dot gnu.org
                   ` (11 more replies)
  0 siblings, 12 replies; 13+ messages in thread
From: danglin at gcc dot gnu.org @ 2012-12-22 20:12 UTC (permalink / raw)
  To: gcc-bugs


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

             Bug #: 55794
           Summary: g++.dg/debug/dwarf2/non-virtual-thunk.C -std=gnu++98
                    and -std=gnu++11
    Classification: Unclassified
           Product: gcc
           Version: 4.8.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: debug
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: danglin@gcc.gnu.org
              Host: hppa-unknown-linux-gnu, hppa64-hp-hpux11.11
            Target: hppa-unknown-linux-gnu, hppa64-hp-hpux11.11
             Build: hppa-unknown-linux-gnu, hppa64-hp-hpux11.11


Created attachment 29030
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=29030
hppa-linux .s

spawn /home/dave/gnu/gcc/objdir/gcc/testsuite/g++/../../xg++
-B/home/dave/gnu/gcc/objdir/gcc/testsuite/g++/../../
/home/dave/gnu/gcc/gcc/gcc/testsuite/g++.dg/debug/dwarf2/non-virtual-thunk.C
-fno-diagnostics-show-caret -nostdinc++
-I/home/dave/gnu/gcc/objdir/hppa-linux-gnu/libstdc++-v3/include/hppa-linux-gnu
-I/home/dave/gnu/gcc/objdir/hppa-linux-gnu/libstdc++-v3/include
-I/home/dave/gnu/gcc/gcc/l
ibstdc++-v3/libsupc++ -I/home/dave/gnu/gcc/gcc/libstdc++-v3/include/backward
-I/home/dave/gnu/gcc/gcc/libstdc++-v3/testsuite/util -fmessage-length=0
-std=gnu++98 -g2 -dA -ffat-lto-objects -S -o non-virtual-thunk.sPASS:
g++.dg/debug/dwarf2/non-virtual-thunk.C -std=gnu++98 (test for excess
errors)FAIL: g++.dg/debug/dwarf2/non-virtual-thunk.C -std=gnu++98 
scan-assembler thunk.C:30


^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Bug debug/55794] FAIL: g++.dg/debug/dwarf2/non-virtual-thunk.C -std=gnu++98 and -std=gnu++11
  2012-12-22 20:12 [Bug debug/55794] New: g++.dg/debug/dwarf2/non-virtual-thunk.C -std=gnu++98 and -std=gnu++11 danglin at gcc dot gnu.org
@ 2013-01-22 17:37 ` janis at gcc dot gnu.org
  2013-01-22 17:39 ` janis at gcc dot gnu.org
                   ` (10 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: janis at gcc dot gnu.org @ 2013-01-22 17:37 UTC (permalink / raw)
  To: gcc-bugs


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

Janis Johnson <janis at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |janis at gcc dot gnu.org

--- Comment #1 from Janis Johnson <janis at gcc dot gnu.org> 2013-01-22 17:36:49 UTC ---
For arm-none-eabi the line that is recorded is 33 rather than 30.

I see from gcc-testresults that the test also fails for moxie-elf, bfin-rtems,
and m32r-rtems.


^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Bug debug/55794] FAIL: g++.dg/debug/dwarf2/non-virtual-thunk.C -std=gnu++98 and -std=gnu++11
  2012-12-22 20:12 [Bug debug/55794] New: g++.dg/debug/dwarf2/non-virtual-thunk.C -std=gnu++98 and -std=gnu++11 danglin at gcc dot gnu.org
  2013-01-22 17:37 ` [Bug debug/55794] FAIL: " janis at gcc dot gnu.org
@ 2013-01-22 17:39 ` janis at gcc dot gnu.org
  2013-03-10 14:40 ` danglin at gcc dot gnu.org
                   ` (9 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: janis at gcc dot gnu.org @ 2013-01-22 17:39 UTC (permalink / raw)
  To: gcc-bugs


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

Janis Johnson <janis at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |ccoutant at gcc dot gnu.org

--- Comment #2 from Janis Johnson <janis at gcc dot gnu.org> 2013-01-22 17:39:09 UTC ---
Adding Cary to the mailing list since he added this test.


^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Bug debug/55794] FAIL: g++.dg/debug/dwarf2/non-virtual-thunk.C -std=gnu++98 and -std=gnu++11
  2012-12-22 20:12 [Bug debug/55794] New: g++.dg/debug/dwarf2/non-virtual-thunk.C -std=gnu++98 and -std=gnu++11 danglin at gcc dot gnu.org
  2013-01-22 17:37 ` [Bug debug/55794] FAIL: " janis at gcc dot gnu.org
  2013-01-22 17:39 ` janis at gcc dot gnu.org
@ 2013-03-10 14:40 ` danglin at gcc dot gnu.org
  2014-04-01  1:33 ` danglin at gcc dot gnu.org
                   ` (8 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: danglin at gcc dot gnu.org @ 2013-03-10 14:40 UTC (permalink / raw)
  To: gcc-bugs


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

John David Anglin <danglin at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|2013-03-09 00:00:00         |2013-03-10
     Ever Confirmed|0                           |1


^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Bug debug/55794] FAIL: g++.dg/debug/dwarf2/non-virtual-thunk.C -std=gnu++98 and -std=gnu++11
  2012-12-22 20:12 [Bug debug/55794] New: g++.dg/debug/dwarf2/non-virtual-thunk.C -std=gnu++98 and -std=gnu++11 danglin at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2013-03-10 14:40 ` danglin at gcc dot gnu.org
@ 2014-04-01  1:33 ` danglin at gcc dot gnu.org
  2014-04-01 17:04 ` ccoutant at gcc dot gnu.org
                   ` (7 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: danglin at gcc dot gnu.org @ 2014-04-01  1:33 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from John David Anglin <danglin at gcc dot gnu.org> ---
Created attachment 32502
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=32502&action=edit
.s file for hppa64-hp-hpux11.11

On hppa64-hp-hpux11.11, I don't see any debug information at all unless
I add "-g" to compile options.


^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Bug debug/55794] FAIL: g++.dg/debug/dwarf2/non-virtual-thunk.C -std=gnu++98 and -std=gnu++11
  2012-12-22 20:12 [Bug debug/55794] New: g++.dg/debug/dwarf2/non-virtual-thunk.C -std=gnu++98 and -std=gnu++11 danglin at gcc dot gnu.org
                   ` (3 preceding siblings ...)
  2014-04-01  1:33 ` danglin at gcc dot gnu.org
@ 2014-04-01 17:04 ` ccoutant at gcc dot gnu.org
  2014-04-01 17:06 ` ccoutant at gcc dot gnu.org
                   ` (6 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: ccoutant at gcc dot gnu.org @ 2014-04-01 17:04 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 from Cary Coutant <ccoutant at gcc dot gnu.org> ---
> On hppa64-hp-hpux11.11, I don't see any debug information at all unless
> I add "-g" to compile options.

The dg-options line adds -g2 -dA to the compile options.

In the assembly output you posted, the two thunks don't have any line number
info at all:

    .globl    _ZThn16_N1CD1Ev
    .type    _ZThn16_N1CD1Ev, @function
_ZThn16_N1CD1Ev:
    .PROC
    .CALLINFO FRAME=0,NO_CALLS
    .ENTRY
    b _ZN1CD2Ev
    ldo -16(%r26),%r26
    .EXIT
    .PROCEND
    .size    _ZThn16_N1CD1Ev, .-_ZThn16_N1CD1Ev

    .globl    _ZThn16_N1CD0Ev
    .type    _ZThn16_N1CD0Ev, @function
_ZThn16_N1CD0Ev:
    .PROC
    .CALLINFO FRAME=0,NO_CALLS
    .ENTRY
    b _ZN1CD0Ev
    ldo -16(%r26),%r26
    .EXIT
    .PROCEND
    .size    _ZThn16_N1CD0Ev, .-_ZThn16_N1CD0Ev

The patch that this test case was part of was supposed to fix that problem by
adding a call to debug_hooks->source_line from assemble_thunk.

Either the PA code generator doesn't go through assemble_thunk when generating
these thunks, or the call to debug_hooks->source_line is being ignored. Richard
Henderson expressed some concerns here:

http://gcc.gnu.org/ml/gcc-patches/2012-08/msg00312.html

I convinced him that the patch was OK, but perhaps he was right, and something
more is needed for PA.


^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Bug debug/55794] FAIL: g++.dg/debug/dwarf2/non-virtual-thunk.C -std=gnu++98 and -std=gnu++11
  2012-12-22 20:12 [Bug debug/55794] New: g++.dg/debug/dwarf2/non-virtual-thunk.C -std=gnu++98 and -std=gnu++11 danglin at gcc dot gnu.org
                   ` (4 preceding siblings ...)
  2014-04-01 17:04 ` ccoutant at gcc dot gnu.org
@ 2014-04-01 17:06 ` ccoutant at gcc dot gnu.org
  2014-04-01 18:02 ` dave.anglin at bell dot net
                   ` (5 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: ccoutant at gcc dot gnu.org @ 2014-04-01 17:06 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #5 from Cary Coutant <ccoutant at gcc dot gnu.org> ---
(In reply to Janis Johnson from comment #1)
> For arm-none-eabi the line that is recorded is 33 rather than 30.
> 
> I see from gcc-testresults that the test also fails for moxie-elf,
> bfin-rtems, and m32r-rtems.

The code at line 33 should be the constructor. Look for the thunks
_ZThn16_N1CD0Ev and _ZThn16_N1CD1Ev. They should have line 30, but I'd guess
the line number info is simply missing from those thunks. If they say line 33,
something else is wrong.


^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Bug debug/55794] FAIL: g++.dg/debug/dwarf2/non-virtual-thunk.C -std=gnu++98 and -std=gnu++11
  2012-12-22 20:12 [Bug debug/55794] New: g++.dg/debug/dwarf2/non-virtual-thunk.C -std=gnu++98 and -std=gnu++11 danglin at gcc dot gnu.org
                   ` (5 preceding siblings ...)
  2014-04-01 17:06 ` ccoutant at gcc dot gnu.org
@ 2014-04-01 18:02 ` dave.anglin at bell dot net
  2014-04-01 18:18 ` ccoutant at google dot com
                   ` (4 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: dave.anglin at bell dot net @ 2014-04-01 18:02 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #6 from dave.anglin at bell dot net ---
On 4/1/2014 1:04 PM, ccoutant at gcc dot gnu.org wrote:
> The patch that this test case was part of was supposed to fix that problem by
> adding a call to debug_hooks->source_line from assemble_thunk.
The patch to cgraphunit.c added the call to debug_hooks->source_line:

diff --git a/gcc/cgraphunit.c b/gcc/cgraphunit.c
index a6591b5..2dd0871 100644
--- a/gcc/cgraphunit.c
+++ b/gcc/cgraphunit.c
@@ -1381,6 +1381,10 @@ assemble_thunk (struct cgraph_node *node)
        init_function_start (thunk_fndecl);
        cfun->is_thunk = 1;
        assemble_start_function (thunk_fndecl, fnname);
+      (*debug_hooks->source_line) (DECL_SOURCE_LINE (thunk_fndecl),
+                                  DECL_SOURCE_FILE (thunk_fndecl),
+                                  /* discriminator */ 0,
+                                  /* is_stmt */ 1);

        targetm.asm_out.output_mi_thunk (asm_out_file, thunk_fndecl,
                                        fixed_offset, virtual_value, alias);

but the change is no longer in the current 4.9 code.  Maybe the call 
needs to be
added to pa_asm_output_mi_thunk.


^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Bug debug/55794] FAIL: g++.dg/debug/dwarf2/non-virtual-thunk.C -std=gnu++98 and -std=gnu++11
  2012-12-22 20:12 [Bug debug/55794] New: g++.dg/debug/dwarf2/non-virtual-thunk.C -std=gnu++98 and -std=gnu++11 danglin at gcc dot gnu.org
                   ` (6 preceding siblings ...)
  2014-04-01 18:02 ` dave.anglin at bell dot net
@ 2014-04-01 18:18 ` ccoutant at google dot com
  2014-04-01 18:49 ` dave.anglin at bell dot net
                   ` (3 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: ccoutant at google dot com @ 2014-04-01 18:18 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #7 from ccoutant at google dot com ---
> but the change is no longer in the current 4.9 code.

Ah, right. See PR 54499 and this thread:

http://gcc.gnu.org/ml/gcc-patches/2012-11/msg00706.html

-cary


^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Bug debug/55794] FAIL: g++.dg/debug/dwarf2/non-virtual-thunk.C -std=gnu++98 and -std=gnu++11
  2012-12-22 20:12 [Bug debug/55794] New: g++.dg/debug/dwarf2/non-virtual-thunk.C -std=gnu++98 and -std=gnu++11 danglin at gcc dot gnu.org
                   ` (7 preceding siblings ...)
  2014-04-01 18:18 ` ccoutant at google dot com
@ 2014-04-01 18:49 ` dave.anglin at bell dot net
  2014-04-06 15:18 ` danglin at gcc dot gnu.org
                   ` (2 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: dave.anglin at bell dot net @ 2014-04-01 18:49 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #8 from dave.anglin at bell dot net ---
On 4/1/2014 2:17 PM, ccoutant at google dot com wrote:
> Ah, right. See PR 54499 and this thread:
>
> http://gcc.gnu.org/ml/gcc-patches/2012-11/msg00706.html
I think I see what's needed in arm.c.


^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Bug debug/55794] FAIL: g++.dg/debug/dwarf2/non-virtual-thunk.C -std=gnu++98 and -std=gnu++11
  2012-12-22 20:12 [Bug debug/55794] New: g++.dg/debug/dwarf2/non-virtual-thunk.C -std=gnu++98 and -std=gnu++11 danglin at gcc dot gnu.org
                   ` (8 preceding siblings ...)
  2014-04-01 18:49 ` dave.anglin at bell dot net
@ 2014-04-06 15:18 ` danglin at gcc dot gnu.org
  2014-04-06 15:26 ` danglin at gcc dot gnu.org
  2014-08-16 17:30 ` danglin at gcc dot gnu.org
  11 siblings, 0 replies; 13+ messages in thread
From: danglin at gcc dot gnu.org @ 2014-04-06 15:18 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #9 from John David Anglin <danglin at gcc dot gnu.org> ---
Author: danglin
Date: Sun Apr  6 15:17:41 2014
New Revision: 209163

URL: http://gcc.gnu.org/viewcvs?rev=209163&root=gcc&view=rev
Log:
    PR debug/55794
    * config/pa/pa.c (pa_output_function_epilogue): Skip address and code
    size accounting for thunks.
    (pa_asm_output_mi_thunk): Use final_start_function() and
    final_end_function() to output function start and end directives.


Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/config/pa/pa.c


^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Bug debug/55794] FAIL: g++.dg/debug/dwarf2/non-virtual-thunk.C -std=gnu++98 and -std=gnu++11
  2012-12-22 20:12 [Bug debug/55794] New: g++.dg/debug/dwarf2/non-virtual-thunk.C -std=gnu++98 and -std=gnu++11 danglin at gcc dot gnu.org
                   ` (9 preceding siblings ...)
  2014-04-06 15:18 ` danglin at gcc dot gnu.org
@ 2014-04-06 15:26 ` danglin at gcc dot gnu.org
  2014-08-16 17:30 ` danglin at gcc dot gnu.org
  11 siblings, 0 replies; 13+ messages in thread
From: danglin at gcc dot gnu.org @ 2014-04-06 15:26 UTC (permalink / raw)
  To: gcc-bugs

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

John David Anglin <danglin at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED

--- Comment #10 from John David Anglin <danglin at gcc dot gnu.org> ---
Fixed on trunk.


^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Bug debug/55794] FAIL: g++.dg/debug/dwarf2/non-virtual-thunk.C -std=gnu++98 and -std=gnu++11
  2012-12-22 20:12 [Bug debug/55794] New: g++.dg/debug/dwarf2/non-virtual-thunk.C -std=gnu++98 and -std=gnu++11 danglin at gcc dot gnu.org
                   ` (10 preceding siblings ...)
  2014-04-06 15:26 ` danglin at gcc dot gnu.org
@ 2014-08-16 17:30 ` danglin at gcc dot gnu.org
  11 siblings, 0 replies; 13+ messages in thread
From: danglin at gcc dot gnu.org @ 2014-08-16 17:30 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=55794

--- Comment #11 from John David Anglin <danglin at gcc dot gnu.org> ---
Author: danglin
Date: Sat Aug 16 17:29:33 2014
New Revision: 214066

URL: https://gcc.gnu.org/viewcvs?rev=214066&root=gcc&view=rev
Log:
    Backport from trunk:
    2014-04-06  John David Anglin  <danglin@gcc.gnu.org>

    PR debug/55794
    * config/pa/pa.c (pa_output_function_epilogue): Skip address and code
    size accounting for thunks.
    (pa_asm_output_mi_thunk): Use final_start_function() and
    final_end_function() to output function start and end directives.


Modified:
    branches/gcc-4_8-branch/gcc/ChangeLog
    branches/gcc-4_8-branch/gcc/config/pa/pa.c


^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2014-08-16 17:30 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-12-22 20:12 [Bug debug/55794] New: g++.dg/debug/dwarf2/non-virtual-thunk.C -std=gnu++98 and -std=gnu++11 danglin at gcc dot gnu.org
2013-01-22 17:37 ` [Bug debug/55794] FAIL: " janis at gcc dot gnu.org
2013-01-22 17:39 ` janis at gcc dot gnu.org
2013-03-10 14:40 ` danglin at gcc dot gnu.org
2014-04-01  1:33 ` danglin at gcc dot gnu.org
2014-04-01 17:04 ` ccoutant at gcc dot gnu.org
2014-04-01 17:06 ` ccoutant at gcc dot gnu.org
2014-04-01 18:02 ` dave.anglin at bell dot net
2014-04-01 18:18 ` ccoutant at google dot com
2014-04-01 18:49 ` dave.anglin at bell dot net
2014-04-06 15:18 ` danglin at gcc dot gnu.org
2014-04-06 15:26 ` danglin at gcc dot gnu.org
2014-08-16 17:30 ` danglin at gcc dot gnu.org

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