]> git.ipfire.org Git - thirdparty/gcc.git/commit
Extend check-function-bodies to allow label and directives
authorH.J. Lu <hjl.tools@gmail.com>
Tue, 27 Aug 2024 14:03:22 +0000 (07:03 -0700)
committerH.J. Lu <hjl.tools@gmail.com>
Tue, 27 Aug 2024 14:18:17 +0000 (07:18 -0700)
commitd6bb1e257fc414d21bc31faa7ddecbc93a197e3c
tree02f24685ca08c6e3af8c968dc7f925fe824719ec
parente223ac9c225352e3aeea7180a3b56a96ecdbe2fd
Extend check-function-bodies to allow label and directives

As PR target/116174 shown, we may need to verify labels and the directive
order.  Extend check-function-bodies to support matched output lines to
allow label and directives.

gcc/

* doc/sourcebuild.texi (check-function-bodies): Add an optional
argument for matched output lines.

gcc/testsuite/

* gcc.target/i386/pr116174.c: Use check-function-bodies.
* lib/scanasm.exp (parse_function_bodies): Append the line if
$up_config(matched) matches the line.
(check-function-bodies): Add an argument for matched.  Set
up_config(matched) to $matched.  Append the expected line without
$config(line_prefix) to function_regexp if it starts with ".L".

Signed-off-by: H.J. Lu <hjl.tools@gmail.com>
gcc/doc/sourcebuild.texi
gcc/testsuite/gcc.target/i386/pr116174.c
gcc/testsuite/lib/scanasm.exp