public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug testsuite/51941] New: FAIL: g++.dg/debug/dwarf2/nested-3.C scan-assembler
@ 2012-01-22 12:46 dominiq at lps dot ens.fr
2012-01-22 14:47 ` [Bug testsuite/51941] " iains at gcc dot gnu.org
` (6 more replies)
0 siblings, 7 replies; 8+ messages in thread
From: dominiq at lps dot ens.fr @ 2012-01-22 12:46 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51941
Bug #: 51941
Summary: FAIL: g++.dg/debug/dwarf2/nested-3.C scan-assembler
Classification: Unclassified
Product: gcc
Version: 4.7.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: testsuite
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: dominiq@lps.ens.fr
CC: ccoutant@google.com, dodji@gcc.gnu.org,
iains@gcc.gnu.org, jakub@redhat.com
Host: x86_64-apple-darwin10
Target: x86_64-apple-darwin10
Build: x86_64-apple-darwin10
The test g++.dg/debug/dwarf2/nested-3.C fails on x86_64-apple-darwin10
FAIL: g++.dg/debug/dwarf2/nested-3.C scan-assembler [^\\n\\r]*\\\\(DIE
\\\\(0x([0-9a-f]+)\\\\)
DW_TAG_namespace\\\\)[\\n\\r]+[^\\n\\r]*"thread[^\\n\\r]+[\\n\\r]+([^\\n\\r]*[\\n\\r]+)+[^\\n\\r]*\\\\(DIE
\\\\(0x([0-9a-f]+)\\\\)
DW_TAG_class_type\\\\)[\\n\\r]+[^\\n\\r]*"Executor[^\\n\\r]+[\\n\\r]+[^\\n\\r]*DW_AT_declaration[\\n\\r]+[^\\n\\r]*\\\\(DIE[^\\n\\r]*DW_TAG_subprogram\\\\)[\\n\\r]+([^\\n\\r]*[\\n\\r]+)+[^\\n\\r]*"CurrentExecutor[^\\n\\r]+[\\n\\r]+([^\\n\\r]*[\\n\\r]+)+([^\\n\\r]*[\\n\\r]+)+[^\\n\\r]*end
of children of DIE 0x\\\\3[\\n\\r]+[^\\n\\r]*end of children of DIE
0x\\\\1[\\n\\r]+
FAIL: g++.dg/debug/dwarf2/nested-3.C scan-assembler [^\\n\\r]*\\\\(DIE
\\\\(0x([0-9a-f]+)\\\\)
DW_TAG_namespace\\\\)[\\n\\r]+[^\\n\\r]*"thread[^\\n\\r]+[\\n\\r]+([^\\n\\r]*[\\n\\r]+)+[^\\n\\r]*\\\\(DIE
\\\\(0x([0-9a-f]+)\\\\)
DW_TAG_class_type\\\\)[\\n\\r]+[^\\n\\r]*"Executor[^\\n\\r]+[\\n\\r]+[^\\n\\r]*DW_AT_declaration[\\n\\r]+[^\\n\\r]*\\\\(DIE[^\\n\\r]*DW_TAG_subprogram\\\\)[\\n\\r]+([^\\n\\r]*[\\n\\r]+)+[^\\n\\r]*"CurrentExecutor[^\\n\\r]+[\\n\\r]+([^\\n\\r]*[\\n\\r]+)+([^\\n\\r]*[\\n\\r]+)+[^\\n\\r]*end
of children of DIE 0x\\\\3[\\n\\r]+[^\\n\\r]*end of children of DIE
0x\\\\1[\\n\\r]+
IIUC the regexp, it tries to match the following part of the assembler
Letext0:
.section .gnu.linkonce.wt.a547508193f2f296
.long 0x57 # Length of Compilation Unit Info
.word 0x4 # DWARF version number
.set L$set$24,Ldebug_abbrev0-Lsection__debug_abbrev
.long L$set$24 # Offset Into Abbrev. Section
.byte 0x8 # Pointer Size (in bytes)
.byte 0xa5 # Type Signature
.byte 0x47
.byte 0x50
.byte 0x81
.byte 0x93
.byte 0xf2
.byte 0xf2
.byte 0x96
.long 0x37 # Offset to Type DIE
.byte 0x1 # uleb128 0x1; (DIE (0x17) DW_TAG_type_unit)
.byte 0x4 # DW_AT_language
.byte 0xdf # DW_AT_GNU_odr_signature
.byte 0xd3
.byte 0xca
.byte 0x9a
.byte 0x1e
.byte 0x9d
.byte 0xca
.byte 0x29
.set L$set$25,Ldebug_line0-Lsection__debug_line
.long L$set$25 # DW_AT_stmt_list
.byte 0x2 # uleb128 0x2; (DIE (0x25) DW_TAG_namespace)
.ascii "thread\0" # DW_AT_name
# DW_AT_declaration
.long 0x37 # DW_AT_sibling
.byte 0x3 # uleb128 0x3; (DIE (0x31) DW_TAG_class_type)
.set L$set$26,LASF0-Lsection__debug_str
.long L$set$26 # DW_AT_name: "Executor"
# DW_AT_declaration
.byte 0 # end of children of DIE 0x25
.byte 0x4 # uleb128 0x4; (DIE (0x37) DW_TAG_class_type)
.byte 0x1 # DW_AT_byte_size
.byte 0x1 # DW_AT_decl_file
(/opt/gcc/work/gcc/testsuite/g++.dg/debug/dwarf2/nested-3.C)
.byte 0x6 # DW_AT_decl_line
.long 0x31 # DW_AT_specification
.long 0x54 # DW_AT_sibling
.byte 0x5 # uleb128 0x5; (DIE (0x43) DW_TAG_subprogram)
# DW_AT_external
.set L$set$27,LASF1-Lsection__debug_str
.long L$set$27 # DW_AT_name: "CurrentExecutor"
.byte 0x1 # DW_AT_decl_file
(/opt/gcc/work/gcc/testsuite/g++.dg/debug/dwarf2/nested-3.C)
.byte 0x8 # DW_AT_decl_line
.set L$set$28,LASF2-Lsection__debug_str
.long L$set$28 # DW_AT_linkage_name:
"_ZN6thread8Executor15CurrentExecutorEv"
.long 0x54 # DW_AT_type
.byte 0x1 # DW_AT_accessibility
# DW_AT_declaration
.byte 0 # end of children of DIE 0x37
.byte 0x6 # uleb128 0x6; (DIE (0x54) DW_TAG_pointer_type)
.byte 0x8 # DW_AT_byte_size
.long 0x37 # DW_AT_type
.byte 0 # end of children of DIE 0x17
.section __DWARF,__debug_info,regular,debug
Since there are extra lines on x86_64-apple-darwin10 between the two "end of
children of DIE" lines, the regexp cannot work. In addition the nesting seems
quite different of the expected one.
In top of that, it is my understanding that darwin does not support dwarf-4 and
is restricted to -gstrict-dwarf (all my knowledge comes from pr41405). So the
test should probably skipped on darwin(?).
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug testsuite/51941] FAIL: g++.dg/debug/dwarf2/nested-3.C scan-assembler
2012-01-22 12:46 [Bug testsuite/51941] New: FAIL: g++.dg/debug/dwarf2/nested-3.C scan-assembler dominiq at lps dot ens.fr
@ 2012-01-22 14:47 ` iains at gcc dot gnu.org
2012-01-23 11:23 ` dodji at gcc dot gnu.org
` (5 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: iains at gcc dot gnu.org @ 2012-01-22 14:47 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51941
Iain Sandoe <iains at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target|x86_64-apple-darwin10 |*-apple-darwin*
Status|UNCONFIRMED |NEW
Last reconfirmed| |2012-01-22
Host|x86_64-apple-darwin10 |*-apple-darwin*
Ever Confirmed|0 |1
Build|x86_64-apple-darwin10 |*-apple-darwin*
--- Comment #1 from Iain Sandoe <iains at gcc dot gnu.org> 2012-01-22 13:01:36 UTC ---
(In reply to comment #0)
Well, as you say... we don't support dwarf-4 (yet)
but even when we do ... this would be broken .. another built-in target
assumption?
> .section .gnu.linkonce.wt.a547508193f2f296
> it is my understanding that darwin does not support dwarf-4
that is correct, and it is not likely to happen "soon" (although we're working
quite hard on getting GAS support).
what's needed is a require-effective-target-dwarf{2,3,4} maybe?
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug testsuite/51941] FAIL: g++.dg/debug/dwarf2/nested-3.C scan-assembler
2012-01-22 12:46 [Bug testsuite/51941] New: FAIL: g++.dg/debug/dwarf2/nested-3.C scan-assembler dominiq at lps dot ens.fr
2012-01-22 14:47 ` [Bug testsuite/51941] " iains at gcc dot gnu.org
@ 2012-01-23 11:23 ` dodji at gcc dot gnu.org
2012-01-23 11:28 ` dodji at gcc dot gnu.org
` (4 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: dodji at gcc dot gnu.org @ 2012-01-23 11:23 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51941
Dodji Seketeli <dodji at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |ASSIGNED
AssignedTo|unassigned at gcc dot |dodji at gcc dot gnu.org
|gnu.org |
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug testsuite/51941] FAIL: g++.dg/debug/dwarf2/nested-3.C scan-assembler
2012-01-22 12:46 [Bug testsuite/51941] New: FAIL: g++.dg/debug/dwarf2/nested-3.C scan-assembler dominiq at lps dot ens.fr
2012-01-22 14:47 ` [Bug testsuite/51941] " iains at gcc dot gnu.org
2012-01-23 11:23 ` dodji at gcc dot gnu.org
@ 2012-01-23 11:28 ` dodji at gcc dot gnu.org
2012-01-23 12:26 ` iains at gcc dot gnu.org
` (3 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: dodji at gcc dot gnu.org @ 2012-01-23 11:28 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51941
--- Comment #2 from Dodji Seketeli <dodji at gcc dot gnu.org> 2012-01-23 11:22:46 UTC ---
Created attachment 26424
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=26424
Candidate fix for the bug
This candidate fix works for me on both x86_64-unknown-linux-gnu and
x86_64-apple-darwin10 built as a cross compiler.
The problem was that on darwin, we get an extra line
.set L$set$31,LASF0-Lsection__debug_str
and I am not sure why.
I don't think we need to prevent the test from running on Darwin (because of it
generating dwarf4) as, IIUC, we don't rely on anything released by Apple for
this. We just scan the assembly output from cc1plus.
Could some Darwin savvy people confirm that the fix works for them?
Thanks.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug testsuite/51941] FAIL: g++.dg/debug/dwarf2/nested-3.C scan-assembler
2012-01-22 12:46 [Bug testsuite/51941] New: FAIL: g++.dg/debug/dwarf2/nested-3.C scan-assembler dominiq at lps dot ens.fr
` (2 preceding siblings ...)
2012-01-23 11:28 ` dodji at gcc dot gnu.org
@ 2012-01-23 12:26 ` iains at gcc dot gnu.org
2012-01-23 13:06 ` dominiq at lps dot ens.fr
` (2 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: iains at gcc dot gnu.org @ 2012-01-23 12:26 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51941
--- Comment #3 from Iain Sandoe <iains at gcc dot gnu.org> 2012-01-23 11:46:19 UTC ---
(In reply to comment #2)
> Created attachment 26424 [details]
> Candidate fix for the bug
>
> This candidate fix works for me on both x86_64-unknown-linux-gnu and
> x86_64-apple-darwin10 built as a cross compiler.
>
> The problem was that on darwin, we get an extra line
> .set L$set$31,LASF0-Lsection__debug_str
>
> and I am not sure why.
The reason for making the offsets absolute is limitations on what the native
tool-chain can handle in terms of generating/using relocs
(although there might well be other latent issues since there is no testing of
dwarf > 2 on darwin so far).
> I don't think we need to prevent the test from running on Darwin (because of it
> generating dwarf4) as, IIUC, we don't rely on anything released by Apple for
> this. We just scan the assembly output from cc1plus.
>
> Could some Darwin savvy people confirm that the fix works for them?
As a fix for the test-case this works for me (and, logically, there is no
reason to exclude darwin if the test works there).
We will have to deal with the other issues as and when we have dwarf > 2 on
Darwin.
(obviously the test-case is emitting incorrect assembler for darwin, since it
assumes that the target can assemble ELF-style named sections).
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug testsuite/51941] FAIL: g++.dg/debug/dwarf2/nested-3.C scan-assembler
2012-01-22 12:46 [Bug testsuite/51941] New: FAIL: g++.dg/debug/dwarf2/nested-3.C scan-assembler dominiq at lps dot ens.fr
` (3 preceding siblings ...)
2012-01-23 12:26 ` iains at gcc dot gnu.org
@ 2012-01-23 13:06 ` dominiq at lps dot ens.fr
2012-01-23 17:26 ` dodji at gcc dot gnu.org
2012-01-23 17:37 ` dodji at gcc dot gnu.org
6 siblings, 0 replies; 8+ messages in thread
From: dominiq at lps dot ens.fr @ 2012-01-23 13:06 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51941
--- Comment #4 from Dominique d'Humieres <dominiq at lps dot ens.fr> 2012-01-23 12:51:06 UTC ---
> > Could some Darwin savvy people confirm that the fix works for them?
>
> As a fix for the test-case this works for me (and, logically, there is no
> reason to exclude darwin if the test works there).
The fix works for me too. Thanks.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug testsuite/51941] FAIL: g++.dg/debug/dwarf2/nested-3.C scan-assembler
2012-01-22 12:46 [Bug testsuite/51941] New: FAIL: g++.dg/debug/dwarf2/nested-3.C scan-assembler dominiq at lps dot ens.fr
` (4 preceding siblings ...)
2012-01-23 13:06 ` dominiq at lps dot ens.fr
@ 2012-01-23 17:26 ` dodji at gcc dot gnu.org
2012-01-23 17:37 ` dodji at gcc dot gnu.org
6 siblings, 0 replies; 8+ messages in thread
From: dodji at gcc dot gnu.org @ 2012-01-23 17:26 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51941
--- Comment #5 from Dodji Seketeli <dodji at gcc dot gnu.org> 2012-01-23 17:05:53 UTC ---
Author: dodji
Date: Mon Jan 23 17:05:46 2012
New Revision: 183441
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=183441
Log:
PR testsuite/51941 - FAIL g++.dg/debug/dwarf2/nested-3.C on Darwin
gcc/testsuite/
PR testsuite/51941
* g++.dg/debug/dwarf2/nested-3.C: Accept multiple lines between
the DW_TAG_class_type and DW_AT_name: "Executor".
Modified:
trunk/gcc/testsuite/ChangeLog
trunk/gcc/testsuite/g++.dg/debug/dwarf2/nested-3.C
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug testsuite/51941] FAIL: g++.dg/debug/dwarf2/nested-3.C scan-assembler
2012-01-22 12:46 [Bug testsuite/51941] New: FAIL: g++.dg/debug/dwarf2/nested-3.C scan-assembler dominiq at lps dot ens.fr
` (5 preceding siblings ...)
2012-01-23 17:26 ` dodji at gcc dot gnu.org
@ 2012-01-23 17:37 ` dodji at gcc dot gnu.org
6 siblings, 0 replies; 8+ messages in thread
From: dodji at gcc dot gnu.org @ 2012-01-23 17:37 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51941
Dodji Seketeli <dodji at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
--- Comment #6 from Dodji Seketeli <dodji at gcc dot gnu.org> 2012-01-23 17:06:57 UTC ---
Fixed in trunk (4.7)
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2012-01-23 17:07 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-01-22 12:46 [Bug testsuite/51941] New: FAIL: g++.dg/debug/dwarf2/nested-3.C scan-assembler dominiq at lps dot ens.fr
2012-01-22 14:47 ` [Bug testsuite/51941] " iains at gcc dot gnu.org
2012-01-23 11:23 ` dodji at gcc dot gnu.org
2012-01-23 11:28 ` dodji at gcc dot gnu.org
2012-01-23 12:26 ` iains at gcc dot gnu.org
2012-01-23 13:06 ` dominiq at lps dot ens.fr
2012-01-23 17:26 ` dodji at gcc dot gnu.org
2012-01-23 17:37 ` dodji 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).