On Fri, May 31, 2024 at 9:09 AM Richard Sandiford
<richard.sandif...@arm.com> wrote:
>
> Wilco Dijkstra <wilco.dijks...@arm.com> writes:
> > 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.
>
> This part is ok, thanks.

Note the issue with single function names was recorded as
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111658 (which I just
closed as fixed).

Thanks,
Andrew Pinski

>
> > @@ -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.
>
> I think this should be done separately.  It looks like at least
> gcc.target/riscv/target-attr-06.c relies on the current behaviour.
>
> Richard

Reply via email to