mikestump <[email protected]> writes:
> On Jun 6, 2026, at 1:20 PM, Richard Sandiford
> <[email protected]> wrote:
>> Iain Sandoe <[email protected]> writes:
>>> To help support multiple platforms when using function body
>>> scans, there is support for adding target-specific options via
>>> "dg-add-options dg-add-options check_function_bodies".
>>> 
>>> However this call has been ommitted from a number of the function body
>>> tests.
>>> 
>>> Fixed by adding them.
>> 
>> Rather than have an extra step
>
> I like as well. Sounds like a good direction. Ok.

Thanks.  Now pushed with the following doc update.


gcc/
        * doc/sourcebuild.texi: Document that check-function-bodies
        automatically adds the check_function_bodies options.

diff --git a/gcc/doc/sourcebuild.texi b/gcc/doc/sourcebuild.texi
index c12771acd2b..1143271424b 100644
--- a/gcc/doc/sourcebuild.texi
+++ b/gcc/doc/sourcebuild.texi
@@ -3389,6 +3389,12 @@ locally when using pic/PIC passes in the testsuite.
 Add the target-specific flags needed to use
 @code{check-function-bodies} from @code{dg-final}.
 
+These options are also added automatically by:
+
+@smallexample
+/* @{ dg-final @{ check-function-bodies @dots{} @} @dots{} @} */
+@end smallexample
+
 @item float@var{n}
 Add the target-specific flags needed to use the @code{_Float@var{n}} type.
 
@@ -3730,6 +3736,15 @@ A line containing just:
 stands for zero or more unmatched lines; the whitespace after
 @var{prefix} is again not significant.
 
+@code{check-function-bodies} automatically adds the same options as:
+
+@smallexample
+/* @{ dg-add-options check_function_bodies @} */
+@end smallexample
+
+For this reason, @code{check-function-bodies} must come after the final
+@code{dg-options} directive.
+
 @end table
 
 @subsubsection Scan object metadata with readelf

Reply via email to