@@ -51,4 +51,4 @@ main ()
//
// Hence the scary regexp:
//
-// { dg-final { 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]+" } }
+// { dg-final { 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]+" } }
Hello, The test of the patch doesn't pass on x86_64-apple-dwarwin10 because the DWARF asm output has an extra line: .set L$set$31,LASF0-Lsection__debug_str before the DW_AT_name: "Executor" line, as in: .byte 0x8 # uleb128 0x8; (DIE (0x92) DW_TAG_namespace) .ascii "thread\0" # DW_AT_name .byte 0x1 # DW_AT_decl_file (/home/dodji/devel/git/gcc/cur/gcc/testsuite/g++.dg/debug/dwarf2/nested-3.C) .byte 0x4 # DW_AT_decl_line .long 0xb7 # DW_AT_sibling .byte 0x9 # uleb128 0x9; (DIE (0xa0) DW_TAG_class_type) .set L$set$31,LASF0-Lsection__debug_str .long L$set$31 # DW_AT_name: "Executor" # DW_AT_declaration .byte 0x5 # uleb128 0x5; (DIE (0xa5) DW_TAG_subprogram) # DW_AT_external .set L$set$32,LASF1-Lsection__debug_str .long L$set$32 # DW_AT_name: "CurrentExecutor" .byte 0x1 # DW_AT_decl_file (/home/dodji/devel/git/gcc/cur/gcc/testsuite/g++.dg/debug/dwarf2/nested-3.C) .byte 0x8 # DW_AT_decl_line .set L$set$33,LASF2-Lsection__debug_str .long L$set$33 # DW_AT_linkage_name: "_ZN6thread8Executor15CurrentExecutorEv" .long 0xb7 # DW_AT_type .byte 0x1 # DW_AT_accessibility # DW_AT_declaration .byte 0 # end of children of DIE 0xa0 .byte 0 # end of children of DIE 0x92 As Iain Sandoe says in the audit trail: The reason for making the offsets absolute is limitations on what the native tool-chain can handle in terms of generating/using relocs Anyway, I just added a "(\[\n\r\]+\[^\n\r\]*)+" to the regexp before matching "Executor" to pass any extraneous line there. Tested on x86_64-apple-dwarwin10 and x86_64-unknown-linux-gnu. OK for trunk? From 01c6dd2755ba6e4204dcaf13f2d34968f1769244 Mon Sep 17 00:00:00 2001 From: Dodji Seketeli <dodji@redhat.com> Date: Mon, 23 Jan 2012 14:53:45 +0100 Subject: [PATCH] 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". --- gcc/testsuite/g++.dg/debug/dwarf2/nested-3.C | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)