Hi Richard, >> On Thu, 3 Jan 2019, Rainer Orth wrote: >> >>> gcc.dg/debug/dwarf2/inline5.c currently FAILs with Solaris as (both >>> sparc and x86): >>> >>> FAIL: gcc.dg/debug/dwarf2/inline5.c scan-assembler-not \\\\(DIE >>> \\\\(0x([0-9a-f]*)\\\\) DW_TAG_lexical_block\\\\)[^#/!]*[#/!] >>> [^(].*DW_TAG_lexical_block\\\\)[^#/!x]*x\\\\1[^#/!]*[#/!] >>> DW_AT_abstract_origin >>> FAIL: gcc.dg/debug/dwarf2/inline5.c scan-assembler-times >>> DW_TAG_lexical_block\\\\)[^#/!]*[#/!] \\\\(DIE \\\\(0x[0-9a-f]*\\\\) >>> DW_TAG_variable 1 >>> >>> The first failure seems to be caused because .* performs multiline >>> matches by default in Tcl; tightening it to [^\n]* avoids the problem. >> >> Hmm, but the matches are supposed to match multiple lines... how >> does it fail for you? > > it matches all of > > (DIE (0x19f) DW_TAG_lexical_block) > .byte 0xd / uleb128 0xd; (DIE (0x1a0) DW_TAG_variable) > .ascii "j" / DW_AT_name > .byte 0x1 / DW_AT_decl_file > (/vol/gcc/src/hg/trunk/local/gcc/testsuite/gcc.dg/debug/dwarf2/inline5.c) > .byte 0x12 / DW_AT_decl_line > .byte 0x14 / DW_AT_decl_column > .long 0x17f / DW_AT_type > .byte 0 / end of children of DIE 0x19f > .byte 0 / end of children of DIE 0x184 > .byte 0xe / uleb128 0xe; (DIE (0x1ac) DW_TAG_subprogram) > .long 0x184 / DW_AT_abstract_origin > .long .LFB0 / DW_AT_low_pc > .long .LFE0-.LFB0 / DW_AT_high_pc > .byte 0x1 / uleb128 0x1; DW_AT_frame_base > .byte 0x9c / DW_OP_call_frame_cfa > / DW_AT_GNU_all_call_sites > .byte 0xf / uleb128 0xf; (DIE (0x1bb) DW_TAG_formal_parameter) > .long 0x195 / DW_AT_abstract_origin > .byte 0x2 / uleb128 0x2; DW_AT_location > .byte 0x91 / DW_OP_fbreg > .byte 0 / sleb128 0 > .byte 0x6 / uleb128 0x6; (DIE (0x1c3) DW_TAG_lexical_block) > .long 0x19f / DW_AT_abstract_origin > > while with gas there's instead > > .uleb128 0xc / (DIE (0xad) DW_TAG_lexical_block) > .uleb128 0xd / (DIE (0xae) DW_TAG_variable) > .ascii "j\0" / DW_AT_name > .byte 0x1 / DW_AT_decl_file > (/vol/gcc/src/hg/trunk/local/gcc/testsuite/gcc.dg/debug/dwarf2/inline5.c) > > i.e. the pattern doesn't match with gas due to the [^(] while with as we > have uleb128 first which does match, producing the failure (which shows > that that part of my patch is wrong).
I still have a hard time determining what to do here. I've now reverted the tree to r264642, i.e. the one before the PR debug/87443 patch. Then I build on x86_64-pc-linux-gnu and ran the inline5.c testcase against the old compiler. I'd have expected all the scan-assembler* tests to FAIL here, but instead I get PASS: gcc.dg/debug/dwarf2/inline5.c (test for excess errors) PASS: gcc.dg/debug/dwarf2/inline5.c scan-assembler-times DW_TAG_inlined_subrouti ne 2 FAIL: gcc.dg/debug/dwarf2/inline5.c scan-assembler-times DW_TAG_lexical_block\\) [^#/!]*[#/!] DW_AT_abstract_origin 2 PASS: gcc.dg/debug/dwarf2/inline5.c scan-assembler-times DW_TAG_lexical_block\\) [^#/!]*[#/!] \\(DIE \\(0x[0-9a-f]*\\) DW_TAG_variable 1 PASS: gcc.dg/debug/dwarf2/inline5.c scan-assembler-not \\(DIE \\(0x([0-9a-f]*)\\ ) DW_TAG_lexical_block\\)[^#/!]*[#/!] [^(].*DW_TAG_lexical_block\\)[^#/!x]*x\\1[ ^#/!]*[#/!] DW_AT_abstract_origin FAIL: gcc.dg/debug/dwarf2/inline5.c scan-assembler-not DW_TAG_lexical_block\\)[^ #/!x]*x([0-9a-f]*)[^#/!]*[#/!] DW_AT_abstract_origin.*\\(DIE \\(0x\\1\\) DW_TAG_ lexical_block\\)[^#/!]*[#/!] DW_AT i.e. the problematic scan-assembler-not test PASSes before and after your patch, making it hard to determine what that test is guarding against (i.e. what is matched on Linux/x86_64 or Solaris with gas) and adapting it to the Solaris as syntax. Rainer -- ----------------------------------------------------------------------------- Rainer Orth, Center for Biotechnology, Bielefeld University