Improve check-function-bodies by allowing single-character function names. Also skip '#' comments which may be emitted from inline assembler.
Passes regress, OK for commit? gcc/testsuite: * lib/scanasm.exp (configure_check-function-bodies): Allow single-char function names. Skip '#' comments. --- diff --git a/gcc/testsuite/lib/scanasm.exp b/gcc/testsuite/lib/scanasm.exp index 6cf9997240deec274a191103d21690d80e34ba95..0e461ef260b7a6fee5a9c60d0571e46468f752c0 100644 --- a/gcc/testsuite/lib/scanasm.exp +++ b/gcc/testsuite/lib/scanasm.exp @@ -869,15 +869,15 @@ proc configure_check-function-bodies { config } { # Regexp for the start of a function definition (name in \1). if { [istarget nvptx*-*-*] } { set up_config(start) { - {^// BEGIN(?: GLOBAL|) FUNCTION DEF: ([a-zA-Z_]\S+)$} + {^// BEGIN(?: GLOBAL|) FUNCTION DEF: ([a-zA-Z_]\S*)$} } } elseif { [istarget *-*-darwin*] } { set up_config(start) { - {^_([a-zA-Z_]\S+):$} + {^_([a-zA-Z_]\S*):$} {^LFB[0-9]+:} } } else { - set up_config(start) {{^([a-zA-Z_]\S+):$}} + set up_config(start) {{^([a-zA-Z_]\S*):$}} } # Regexp for the end of a function definition. @@ -899,9 +899,9 @@ proc configure_check-function-bodies { config } { } else { # Skip lines beginning with labels ('.L[...]:') or other directives # ('.align', '.cfi_startproc', '.quad [...]', '.text', etc.), '//' or - # '@' comments ('-fverbose-asm' or ARM-style, for example), or empty - # lines. - set up_config(fluff) {^\s*(?:\.|//|@|$)} + # '@' or '#' comments ('-fverbose-asm' or ARM-style, for example), or + # empty lines. + set up_config(fluff) {^\s*(?:\.|//|@|#|$)} } # Regexp for expected output lines prefix.