On Fri, Feb 01, 2019 at 09:06:16AM +0100, Richard Biener wrote: > Tested by Steve, committed.
This actually fixed it for aarch64 which uses // as ASM_COMMENT_START, but not e.g. for arm which uses @ as ASM_COMMENT_START. grep -h define[[:blank:]]ASM_COMMENT_START *.h config/*/* | sed 's/START[[:blank:]]*/START /' | sort -u #define ASM_COMMENT_START " #" #define ASM_COMMENT_START " ; " #define ASM_COMMENT_START " ;" #define ASM_COMMENT_START "!" #define ASM_COMMENT_START "!#" #define ASM_COMMENT_START "# " #define ASM_COMMENT_START "#" #define ASM_COMMENT_START "##" #define ASM_COMMENT_START "/ " #define ASM_COMMENT_START "/" #define ASM_COMMENT_START "//" #define ASM_COMMENT_START ";" #define ASM_COMMENT_START ";#" #define ASM_COMMENT_START "@" #define ASM_COMMENT_START "|" #define ASM_COMMENT_START "\t//" shows many other comments starts, in particular @, ; and | was missing in there, plus some ASM_COMMENT_START end with a space and that means not one, but two spaces after the comment start char - dwarf2asm.c typically emits fprintf (asm_out_file, "\t%s ", ASM_COMMENT_START); or similar. This patch adds those @, ; and | characters to the comment start set and allows more than one space after it. Tested on x86_64-linux, ok for trunk? 2019-02-04 Jakub Jelinek <ja...@redhat.com> * gcc.dg/debug/dwarf2/inline5.c: Handle also @, ; or | comment characters or extra spaces after the comment character. --- gcc/testsuite/gcc.dg/debug/dwarf2/inline5.c.jj 2019-02-01 23:52:23.619042785 +0100 +++ gcc/testsuite/gcc.dg/debug/dwarf2/inline5.c 2019-02-04 10:18:56.123814522 +0100 @@ -4,13 +4,13 @@ /* { dg-options "-O -gdwarf -dA" } */ /* { dg-do compile } */ /* { dg-final { scan-assembler-times "DW_TAG_inlined_subroutine" 2 } } */ -/* { dg-final { scan-assembler-times "DW_TAG_lexical_block\\)\[^#/!\]*\[#/!\]+ DW_AT_abstract_origin" 2 } } */ -/* { dg-final { scan-assembler-times "DW_TAG_lexical_block\\)\[^#/!\]*\[#/!\]+ \\(DIE \\(0x\[0-9a-f\]*\\) DW_TAG_variable" 1 } } */ +/* { dg-final { scan-assembler-times "DW_TAG_lexical_block\\)\[^#/!@;\\|\]*\[#/!@;\\|\]+ +DW_AT_abstract_origin" 2 } } */ +/* { dg-final { scan-assembler-times "DW_TAG_lexical_block\\)\[^#/!@;\\|\]*\[#/!@;\\|\]+ +\\(DIE \\(0x\[0-9a-f\]*\\) DW_TAG_variable" 1 } } */ /* We do not know which is output first so look for both invalid abstract origins on the lexical blocks (knowing that the abstract instance has no attribute following the DW_TAG_lexical_block. */ -/* { dg-final { scan-assembler-not "\\(DIE \\(0x(\[0-9a-f\]*)\\) DW_TAG_lexical_block\\)\[^#/!\]*\[#/!\]+ \[^(\].*DW_TAG_lexical_block\\)\[^#/!x\]*x\\1\[^#/!\]*\[#/!\] DW_AT_abstract_origin" } } */ -/* { dg-final { 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" } } */ +/* { dg-final { scan-assembler-not "\\(DIE \\(0x(\[0-9a-f\]*)\\) DW_TAG_lexical_block\\)\[^#/!@;\\|\]*\[#/!@;\\|\]+ +\[^(\].*DW_TAG_lexical_block\\)\[^#/!@;\\|x\]*x\\1\[^#/!@;\\|\]*\[#/!@;\\|\] +DW_AT_abstract_origin" } } */ +/* { dg-final { 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" } } */ int foo (int i) { Jakub