diff options
author | Richard Sandiford <richard.sandiford@arm.com> | 2020-03-17 15:26:22 +0000 |
---|---|---|
committer | Richard Sandiford <richard.sandiford@arm.com> | 2020-04-09 13:01:26 +0100 |
commit | 7ed2d6cbd094871a0dd23f2d433b962d5f462936 (patch) | |
tree | b6f46ebc5cf129ed060e2b62f7412d8bd7faf750 /gcc/doc | |
parent | bb40460646ce4e6ad27a2f6795106d004d405314 (diff) | |
download | gcc-7ed2d6cbd094871a0dd23f2d433b962d5f462936.zip gcc-7ed2d6cbd094871a0dd23f2d433b962d5f462936.tar.gz gcc-7ed2d6cbd094871a0dd23f2d433b962d5f462936.tar.bz2 |
testsuite: Tweak check-function-bodies interface
In g:2171a9207f51bc486ed9c502cb4da706f594615e I'd tried to fix
various ILP32 testsuite failures by restricting some tests to LP64.
Unfortunately, I messed up the check-function-bodies syntax and passed
the target selector as the "option" parameter, which had the effect of
disabling the tests for both ILP32 and LP64.
The fix ought to have been to add "" as the option parameter. However,
check-function-bodies wasn't treating "" in the same way as an omitted
argument. The easiest fix seemed to be turn the argument into a list of
options, which also makes the interface a bit more general.
Having done that, it seemed a good idea to check for things that look
like target/xfail selectors, so that the mistake isn't silent next time.
2020-04-09 Richard Sandiford <richard.sandiford@arm.com>
gcc/
* doc/sourcebuild.texi (check-function-bodies): Treat the third
parameter as a list of option regexps and require each regexp
to match.
gcc/testsuite/
* lib/scanasm.exp (check-function-bodies): Treat the third
parameter as a list of option regexps and require each regexp
to match. Check for cases in which a target/xfail selector
was mistakenly passed to the options argument.
* gcc.target/aarch64/sve/pcs/args_1.c: Add an empty options list
to the invocation of check-function-bodies.
* gcc.target/aarch64/sve/pcs/args_2.c: Likewise.
* gcc.target/aarch64/sve/pcs/args_3.c: Likewise.
* gcc.target/aarch64/sve/pcs/args_4.c: Likewise.
* gcc.target/aarch64/sve/pcs/return_1.c: Likewise.
* gcc.target/aarch64/sve/pcs/return_1_1024.c: Likewise.
* gcc.target/aarch64/sve/pcs/return_1_128.c: Likewise.
* gcc.target/aarch64/sve/pcs/return_1_2048.c: Likewise.
* gcc.target/aarch64/sve/pcs/return_1_256.c: Likewise.
* gcc.target/aarch64/sve/pcs/return_1_512.c: Likewise.
* gcc.target/aarch64/sve/pcs/return_2.c: Likewise.
* gcc.target/aarch64/sve/pcs/return_3.c: Likewise.
* gcc.target/aarch64/sve/pcs/return_4.c: Likewise.
* gcc.target/aarch64/sve/pcs/return_4_1024.c: Likewise.
* gcc.target/aarch64/sve/pcs/return_4_128.c: Likewise.
* gcc.target/aarch64/sve/pcs/return_4_2048.c: Likewise.
* gcc.target/aarch64/sve/pcs/return_4_256.c: Likewise.
* gcc.target/aarch64/sve/pcs/return_4_512.c: Likewise.
* gcc.target/aarch64/sve/pcs/return_5.c: Likewise.
* gcc.target/aarch64/sve/pcs/return_5_1024.c: Likewise.
* gcc.target/aarch64/sve/pcs/return_5_128.c: Likewise.
* gcc.target/aarch64/sve/pcs/return_5_2048.c: Likewise.
* gcc.target/aarch64/sve/pcs/return_5_256.c: Likewise.
* gcc.target/aarch64/sve/pcs/return_5_512.c: Likewise.
* gcc.target/aarch64/sve/pcs/return_6.c: Likewise.
* gcc.target/aarch64/sve/pcs/return_6_1024.c: Likewise.
* gcc.target/aarch64/sve/pcs/return_6_128.c: Likewise.
* gcc.target/aarch64/sve/pcs/return_6_2048.c: Likewise.
* gcc.target/aarch64/sve/pcs/return_6_256.c: Likewise.
* gcc.target/aarch64/sve/pcs/return_6_512.c: Likewise.
* gcc.target/aarch64/sve/pcs/saves_2_be_nowrap.c: Likewise.
* gcc.target/aarch64/sve/pcs/saves_2_be_wrap.c: Likewise.
* gcc.target/aarch64/sve/pcs/saves_2_le_nowrap.c: Likewise.
* gcc.target/aarch64/sve/pcs/saves_2_le_wrap.c: Likewise.
* gcc.target/aarch64/sve/pcs/saves_3.c: Likewise.
* gcc.target/aarch64/sve/pcs/saves_4_be.c: Likewise.
* gcc.target/aarch64/sve/pcs/saves_4_le.c: Likewise.
* gcc.target/aarch64/sve/pcs/stack_clash_2_128.c: Likewise.
* gcc.target/aarch64/sve/pcs/varargs_1.c: Likewise.
* gcc.target/aarch64/sve/pcs/varargs_2_f16.c: Likewise.
* gcc.target/aarch64/sve/pcs/varargs_2_f32.c: Likewise.
* gcc.target/aarch64/sve/pcs/varargs_2_f64.c: Likewise.
* gcc.target/aarch64/sve/pcs/varargs_2_s16.c: Likewise.
* gcc.target/aarch64/sve/pcs/varargs_2_s32.c: Likewise.
* gcc.target/aarch64/sve/pcs/varargs_2_s64.c: Likewise.
* gcc.target/aarch64/sve/pcs/varargs_2_s8.c: Likewise.
* gcc.target/aarch64/sve/pcs/varargs_2_u16.c: Likewise.
* gcc.target/aarch64/sve/pcs/varargs_2_u32.c: Likewise.
* gcc.target/aarch64/sve/pcs/varargs_2_u64.c: Likewise.
* gcc.target/aarch64/sve/pcs/varargs_2_u8.c: Likewise.
Diffstat (limited to 'gcc/doc')
-rw-r--r-- | gcc/doc/sourcebuild.texi | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/gcc/doc/sourcebuild.texi b/gcc/doc/sourcebuild.texi index 26a57e3..0bccae8 100644 --- a/gcc/doc/sourcebuild.texi +++ b/gcc/doc/sourcebuild.texi @@ -2754,17 +2754,19 @@ assembly output. Passes if @var{symbol} is not defined as a hidden symbol in the test's assembly output. -@item check-function-bodies @var{prefix} @var{terminator} [@var{option} [@{ target/xfail @var{selector} @}]] +@item check-function-bodies @var{prefix} @var{terminator} [@var{options} [@{ target/xfail @var{selector} @}]] Looks through the source file for comments that give the expected assembly output for selected functions. Each line of expected output starts with the prefix string @var{prefix} and the expected output for a function as a whole is followed by a line that starts with the string @var{terminator}. Specifying an empty terminator is equivalent to specifying @samp{"*/"}. -If @var{option} is specified, the test only applies to command lines -that contain @var{option}. This can be useful if a source file is compiled -both with and without optimization, since it is rarely useful to check the -assembly output for unoptimized code. +@var{options}, if specified, is a list of regular expressions, each of +which matches a full command-line option. A non-empty list prevents +the test from running unless all of the given options are present on the +command line. This can help if a source file is compiled both with +and without optimization, since it is rarely useful to check the full +function body for unoptimized code. The first line of the expected output for a function @var{fn} has the form: |