testsuite: Tweak check-function-bodies interface
authorRichard Sandiford <richard.sandiford@arm.com>
Tue, 17 Mar 2020 15:26:22 +0000 (15:26 +0000)
committerRichard Sandiford <richard.sandiford@arm.com>
Thu, 9 Apr 2020 12:01:26 +0000 (13:01 +0100)
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.

54 files changed:
gcc/ChangeLog
gcc/doc/sourcebuild.texi
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.target/aarch64/sve/pcs/args_1.c
gcc/testsuite/gcc.target/aarch64/sve/pcs/args_2.c
gcc/testsuite/gcc.target/aarch64/sve/pcs/args_3.c
gcc/testsuite/gcc.target/aarch64/sve/pcs/args_4.c
gcc/testsuite/gcc.target/aarch64/sve/pcs/return_1.c
gcc/testsuite/gcc.target/aarch64/sve/pcs/return_1_1024.c
gcc/testsuite/gcc.target/aarch64/sve/pcs/return_1_128.c
gcc/testsuite/gcc.target/aarch64/sve/pcs/return_1_2048.c
gcc/testsuite/gcc.target/aarch64/sve/pcs/return_1_256.c
gcc/testsuite/gcc.target/aarch64/sve/pcs/return_1_512.c
gcc/testsuite/gcc.target/aarch64/sve/pcs/return_2.c
gcc/testsuite/gcc.target/aarch64/sve/pcs/return_3.c
gcc/testsuite/gcc.target/aarch64/sve/pcs/return_4.c
gcc/testsuite/gcc.target/aarch64/sve/pcs/return_4_1024.c
gcc/testsuite/gcc.target/aarch64/sve/pcs/return_4_128.c
gcc/testsuite/gcc.target/aarch64/sve/pcs/return_4_2048.c
gcc/testsuite/gcc.target/aarch64/sve/pcs/return_4_256.c
gcc/testsuite/gcc.target/aarch64/sve/pcs/return_4_512.c
gcc/testsuite/gcc.target/aarch64/sve/pcs/return_5.c
gcc/testsuite/gcc.target/aarch64/sve/pcs/return_5_1024.c
gcc/testsuite/gcc.target/aarch64/sve/pcs/return_5_128.c
gcc/testsuite/gcc.target/aarch64/sve/pcs/return_5_2048.c
gcc/testsuite/gcc.target/aarch64/sve/pcs/return_5_256.c
gcc/testsuite/gcc.target/aarch64/sve/pcs/return_5_512.c
gcc/testsuite/gcc.target/aarch64/sve/pcs/return_6.c
gcc/testsuite/gcc.target/aarch64/sve/pcs/return_6_1024.c
gcc/testsuite/gcc.target/aarch64/sve/pcs/return_6_128.c
gcc/testsuite/gcc.target/aarch64/sve/pcs/return_6_2048.c
gcc/testsuite/gcc.target/aarch64/sve/pcs/return_6_256.c
gcc/testsuite/gcc.target/aarch64/sve/pcs/return_6_512.c
gcc/testsuite/gcc.target/aarch64/sve/pcs/saves_2_be_nowrap.c
gcc/testsuite/gcc.target/aarch64/sve/pcs/saves_2_be_wrap.c
gcc/testsuite/gcc.target/aarch64/sve/pcs/saves_2_le_nowrap.c
gcc/testsuite/gcc.target/aarch64/sve/pcs/saves_2_le_wrap.c
gcc/testsuite/gcc.target/aarch64/sve/pcs/saves_3.c
gcc/testsuite/gcc.target/aarch64/sve/pcs/saves_4_be.c
gcc/testsuite/gcc.target/aarch64/sve/pcs/saves_4_le.c
gcc/testsuite/gcc.target/aarch64/sve/pcs/stack_clash_2_128.c
gcc/testsuite/gcc.target/aarch64/sve/pcs/varargs_1.c
gcc/testsuite/gcc.target/aarch64/sve/pcs/varargs_2_f16.c
gcc/testsuite/gcc.target/aarch64/sve/pcs/varargs_2_f32.c
gcc/testsuite/gcc.target/aarch64/sve/pcs/varargs_2_f64.c
gcc/testsuite/gcc.target/aarch64/sve/pcs/varargs_2_s16.c
gcc/testsuite/gcc.target/aarch64/sve/pcs/varargs_2_s32.c
gcc/testsuite/gcc.target/aarch64/sve/pcs/varargs_2_s64.c
gcc/testsuite/gcc.target/aarch64/sve/pcs/varargs_2_s8.c
gcc/testsuite/gcc.target/aarch64/sve/pcs/varargs_2_u16.c
gcc/testsuite/gcc.target/aarch64/sve/pcs/varargs_2_u32.c
gcc/testsuite/gcc.target/aarch64/sve/pcs/varargs_2_u64.c
gcc/testsuite/gcc.target/aarch64/sve/pcs/varargs_2_u8.c
gcc/testsuite/lib/scanasm.exp

index 80492ef4163218e3e857e998a4aeb85af62d473c..d211d7391a836761fc2aa0174ccc0822618f58dc 100644 (file)
@@ -1,3 +1,9 @@
+2020-04-09  Richard Sandiford  <richard.sandiford@arm.com>
+
+       * doc/sourcebuild.texi (check-function-bodies): Treat the third
+       parameter as a list of option regexps and require each regexp
+       to match.
+
 2020-04-09  Andrea Corallo  <andrea.corallo@arm.com>
 
        PR target/94530
index 26a57e3199b885e895bb14d28d3f9e97bfb3c100..0bccae8eeee51460cfb68b8013e4e1b43539ed7b 100644 (file)
@@ -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:
 
index ba530077ee2a9d4b84328857440ba30a0d6c687e..991241ee27f2b3528b4381dc5288d827fb84d4f1 100644 (file)
@@ -1,3 +1,61 @@
+2020-04-09  Richard Sandiford  <richard.sandiford@arm.com>
+
+       * 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.
+
 2020-04-09  Richard Biener  <rguenther@suse.de>
 
        PR testsuite/93369
index ab7c4a10cfbb976594dc44d0e611cd1662d5002c..4509fff223a1c233be015ac8fc9e8966e4751112 100644 (file)
@@ -1,6 +1,6 @@
 /* { dg-do compile } */
 /* { dg-options "-O -g" } */
-/* { dg-final { check-function-bodies "**" "" { target lp64 } } } */
+/* { dg-final { check-function-bodies "**" "" "" { target lp64 } } } */
 
 #include <arm_sve.h>
 
index 43a50887dc99e4efbb89d258c648da979baca889..29e80dc7733a13f496cf2ddcd5a3ddf6069de388 100644 (file)
@@ -1,6 +1,6 @@
 /* { dg-do compile } */
 /* { dg-options "-O -fno-stack-clash-protection -g" } */
-/* { dg-final { check-function-bodies "**" "" { target lp64 } } } */
+/* { dg-final { check-function-bodies "**" "" "" { target lp64 } } } */
 
 #include <arm_sve.h>
 
index 49fdfc984644bf234ca916acaf9fffcfd62bb7ac..611f3d03bcafb41534ba751c02fa3ade84219645 100644 (file)
@@ -1,6 +1,6 @@
 /* { dg-do compile } */
 /* { dg-options "-O -fno-stack-clash-protection -g" } */
-/* { dg-final { check-function-bodies "**" "" { target lp64 } } } */
+/* { dg-final { check-function-bodies "**" "" "" { target lp64 } } } */
 
 #include <arm_sve.h>
 
index 4f15fdd50a5e31ab54b00d48667e012b74c3c6f4..c40d63e678e6a9e1e8f4e8f4b1b6f3741886292a 100644 (file)
@@ -1,6 +1,6 @@
 /* { dg-do compile } */
 /* { dg-options "-O -fno-stack-clash-protection -g" } */
-/* { dg-final { check-function-bodies "**" "" { target lp64 } } } */
+/* { dg-final { check-function-bodies "**" "" "" { target lp64 } } } */
 
 #include <arm_sve.h>
 
index f6328c901ae162a240df6d6060e20950f43ee1e4..8ad16045ef0151e97958edc337997214148ba2e9 100644 (file)
@@ -1,6 +1,6 @@
 /* { dg-do compile } */
 /* { dg-options "-O -g" } */
-/* { dg-final { check-function-bodies "**" "" { target lp64 } } } */
+/* { dg-final { check-function-bodies "**" "" "" { target lp64 } } } */
 
 /*
 ** callee_pred:
index 450a3f02971e4338f272a22fb8e3c171f7a98730..d351a1d252027d961e1e9fa9968c78204f43a1ac 100644 (file)
@@ -1,6 +1,6 @@
 /* { dg-do compile } */
 /* { dg-options "-O -msve-vector-bits=1024 -g" } */
-/* { dg-final { check-function-bodies "**" "" { target lp64 } } } */
+/* { dg-final { check-function-bodies "**" "" "" { target lp64 } } } */
 
 /*
 ** callee_pred:
index 75d1e2252f3bc2a7ccd99fb45e1d6400ceb64a89..c164c01a9443d03182161a521e1c572a9a6b0e09 100644 (file)
@@ -1,6 +1,6 @@
 /* { dg-do compile } */
 /* { dg-options "-O -msve-vector-bits=128 -g" } */
-/* { dg-final { check-function-bodies "**" "" { target { aarch64_little_endian && lp64 } } } } */
+/* { dg-final { check-function-bodies "**" "" "" { target { aarch64_little_endian && lp64 } } } } */
 
 /*
 ** callee_pred:
index c9ea26899268427a7c1d77333fda6a7c50831b55..cb0f2f0ee536b2061742629be2dccf7abaff6237 100644 (file)
@@ -1,6 +1,6 @@
 /* { dg-do compile } */
 /* { dg-options "-O -msve-vector-bits=2048 -g" } */
-/* { dg-final { check-function-bodies "**" "" { target lp64 } } } */
+/* { dg-final { check-function-bodies "**" "" "" { target lp64 } } } */
 
 /*
 ** callee_pred:
index 62bc695d1419bcef2f693152c370255f8641d16a..c5d7181831ac263a18eee1bbd99577b88f8fc255 100644 (file)
@@ -1,6 +1,6 @@
 /* { dg-do compile } */
 /* { dg-options "-O -msve-vector-bits=256 -g" } */
-/* { dg-final { check-function-bodies "**" "" { target lp64 } } } */
+/* { dg-final { check-function-bodies "**" "" "" { target lp64 } } } */
 
 /*
 ** callee_pred:
index f687689ce9fa9a7b8e87f96763a444907d39b4aa..41b3eff9aa1b938cf8e28229fd73e4df2e7c2313 100644 (file)
@@ -1,6 +1,6 @@
 /* { dg-do compile } */
 /* { dg-options "-O -msve-vector-bits=512 -g" } */
-/* { dg-final { check-function-bodies "**" "" { target lp64 } } } */
+/* { dg-final { check-function-bodies "**" "" "" { target lp64 } } } */
 
 /*
 ** callee_pred:
index efaa81394a9b6189496176d20a97fd766237dfcc..676be9d90ea28c88b7cc07068703aef616fb5f16 100644 (file)
@@ -1,6 +1,6 @@
 /* { dg-do compile } */
 /* { dg-options "-O -g" } */
-/* { dg-final { check-function-bodies "**" "" { target lp64 } } } */
+/* { dg-final { check-function-bodies "**" "" "" { target lp64 } } } */
 
 #include <arm_sve.h>
 
index 71046447d7b5822f32595e2dc9d37c0572de1ea6..2bb6c79265195f453dab9f49d42bfc03670ca3bc 100644 (file)
@@ -1,6 +1,6 @@
 /* { dg-do compile } */
 /* { dg-options "-O -g" } */
-/* { dg-final { check-function-bodies "**" "" { target lp64 } } } */
+/* { dg-final { check-function-bodies "**" "" "" { target lp64 } } } */
 
 #include <arm_sve.h>
 
index 00eb2cbda8d80cae086b1119a810031b70f449cb..1e38371842f593741e6f9920cf6d703bd64b8ea9 100644 (file)
@@ -1,6 +1,6 @@
 /* { dg-do compile } */
 /* { dg-options "-O -g" } */
-/* { dg-final { check-function-bodies "**" "" { target lp64 } } } */
+/* { dg-final { check-function-bodies "**" "" "" { target lp64 } } } */
 
 #define CALLEE(SUFFIX, TYPE)                   \
   TYPE __attribute__((noipa))                  \
index 43519634c45b61b87f68a9f2ab56b525327c3212..491c35af221dccb71179f30715c224b14dcda806 100644 (file)
@@ -1,6 +1,6 @@
 /* { dg-do compile } */
 /* { dg-options "-O -msve-vector-bits=1024 -g" } */
-/* { dg-final { check-function-bodies "**" "" { target lp64 } } } */
+/* { dg-final { check-function-bodies "**" "" "" { target lp64 } } } */
 
 #define CALLEE(SUFFIX, TYPE)                   \
   TYPE __attribute__((noipa))                  \
index 6b490226bff44b91324f8670406750120132cbf5..eebb913273ac0f39d7b79df3920c75b9a106097a 100644 (file)
@@ -1,6 +1,6 @@
 /* { dg-do compile } */
 /* { dg-options "-O -msve-vector-bits=128 -g" } */
-/* { dg-final { check-function-bodies "**" "" { target { aarch64_little_endian && lp64 } } } } */
+/* { dg-final { check-function-bodies "**" "" "" { target { aarch64_little_endian && lp64 } } } } */
 
 #define CALLEE(SUFFIX, TYPE)                   \
   TYPE __attribute__((noipa))                  \
index 8256645f56c4adc7ce681ed9984040bb209fd84d..73c3b2ec0454dae40c916c79ea813cc3602e5534 100644 (file)
@@ -1,6 +1,6 @@
 /* { dg-do compile } */
 /* { dg-options "-O -msve-vector-bits=2048 -g" } */
-/* { dg-final { check-function-bodies "**" "" { target lp64 } } } */
+/* { dg-final { check-function-bodies "**" "" "" { target lp64 } } } */
 
 #define CALLEE(SUFFIX, TYPE)                   \
   TYPE __attribute__((noipa))                  \
index 1e0f6bb96f8396b128894eaeb1e74da8ea581d3e..29744c81402d9c472e22252ccde64d79cb025346 100644 (file)
@@ -1,6 +1,6 @@
 /* { dg-do compile } */
 /* { dg-options "-O -msve-vector-bits=256 -g" } */
-/* { dg-final { check-function-bodies "**" "" { target lp64 } } } */
+/* { dg-final { check-function-bodies "**" "" "" { target lp64 } } } */
 
 #define CALLEE(SUFFIX, TYPE)                   \
   TYPE __attribute__((noipa))                  \
index 5b58ed73454f1d0f28ca3753bb170ceb2b0cb377..cf25c31bcbf30a5b0ddf524f32aceafe375df884 100644 (file)
@@ -1,6 +1,6 @@
 /* { dg-do compile } */
 /* { dg-options "-O -msve-vector-bits=512 -g" } */
-/* { dg-final { check-function-bodies "**" "" { target lp64 } } } */
+/* { dg-final { check-function-bodies "**" "" "" { target lp64 } } } */
 
 #define CALLEE(SUFFIX, TYPE)                   \
   TYPE __attribute__((noipa))                  \
index 55c78e16f65fff119aaec08cfe02e92aad73d489..9ad3e22765462d3d3ccd61bbaca273ce0235d2b8 100644 (file)
@@ -1,6 +1,6 @@
 /* { dg-do compile } */
 /* { dg-options "-O -g" } */
-/* { dg-final { check-function-bodies "**" "" { target lp64 } } } */
+/* { dg-final { check-function-bodies "**" "" "" { target lp64 } } } */
 
 #include <arm_sve.h>
 
index 52e9916d8bc27da4272c353fbd4f6187d65be70b..d573e5fc69c0fd6c714fc89f138d2a8be960a1ab 100644 (file)
@@ -1,6 +1,6 @@
 /* { dg-do compile } */
 /* { dg-options "-O -msve-vector-bits=1024 -g" } */
-/* { dg-final { check-function-bodies "**" "" { target lp64 } } } */
+/* { dg-final { check-function-bodies "**" "" "" { target lp64 } } } */
 
 #include <arm_sve.h>
 
index cfb2f381937fd4bc5ec0f6c07d9bee9447b24a3c..200b0eb82423c259ed2e83d956c799455ed494a7 100644 (file)
@@ -1,6 +1,6 @@
 /* { dg-do compile } */
 /* { dg-options "-O -msve-vector-bits=128 -g" } */
-/* { dg-final { check-function-bodies "**" "" { target { aarch64_little_endian && lp64 } } } } */
+/* { dg-final { check-function-bodies "**" "" "" { target { aarch64_little_endian && lp64 } } } } */
 
 #include <arm_sve.h>
 
index 6f37d9d6c44f9f9517df0c2a6f58d547ef4400d6..f6f8858fd4773ea6feba1890e64b3b80570d0dbf 100644 (file)
@@ -1,6 +1,6 @@
 /* { dg-do compile } */
 /* { dg-options "-O -msve-vector-bits=2048 -g" } */
-/* { dg-final { check-function-bodies "**" "" { target lp64 } } } */
+/* { dg-final { check-function-bodies "**" "" "" { target lp64 } } } */
 
 #include <arm_sve.h>
 
index 7ba094e1667f0ac6ae77a51f7b1b69d2e2f8bd12..e62f59cc885b613b88c84466f32c8b80a2275e47 100644 (file)
@@ -1,6 +1,6 @@
 /* { dg-do compile } */
 /* { dg-options "-O -msve-vector-bits=256 -g" } */
-/* { dg-final { check-function-bodies "**" "" { target lp64 } } } */
+/* { dg-final { check-function-bodies "**" "" "" { target lp64 } } } */
 
 #include <arm_sve.h>
 
index 36b14d4208962d9e930b4006cd2dcf3ca2f41e82..483558cb57688a124bf01e875b22994067b3f499 100644 (file)
@@ -1,6 +1,6 @@
 /* { dg-do compile } */
 /* { dg-options "-O -msve-vector-bits=512 -g" } */
-/* { dg-final { check-function-bodies "**" "" { target lp64 } } } */
+/* { dg-final { check-function-bodies "**" "" "" { target lp64 } } } */
 
 #include <arm_sve.h>
 
index 72468eab1fdcb35c93a5ff41822d0edad10b7549..1bc2f43bcf97725ac253999dabf3cc40a8f044dc 100644 (file)
@@ -1,6 +1,6 @@
 /* { dg-do compile } */
 /* { dg-options "-O -g" } */
-/* { dg-final { check-function-bodies "**" "" { target lp64 } } } */
+/* { dg-final { check-function-bodies "**" "" "" { target lp64 } } } */
 
 #include <stdint.h>
 
index b6f267e76950cc47a8d560a435025c3c91b4d4db..de69d9a42ce12afc02dbcad188f27beccf1a45db 100644 (file)
@@ -1,6 +1,6 @@
 /* { dg-do compile } */
 /* { dg-options "-O -msve-vector-bits=1024 -g" } */
-/* { dg-final { check-function-bodies "**" "" { target lp64 } } } */
+/* { dg-final { check-function-bodies "**" "" "" { target lp64 } } } */
 
 #include <stdint.h>
 
index fd838453feb38182db971dca608fa4c5b9d0a885..4f190fd1444321908c74dab6dbcd12ce02536863 100644 (file)
@@ -1,6 +1,6 @@
 /* { dg-do compile } */
 /* { dg-options "-O -msve-vector-bits=128 -g" } */
-/* { dg-final { check-function-bodies "**" "" { target { aarch64_little_endian && lp64 } } } } */
+/* { dg-final { check-function-bodies "**" "" "" { target { aarch64_little_endian && lp64 } } } } */
 
 #include <stdint.h>
 
index 46b7d683e02f260b0f51415d64dbb2028236a107..0b64ff2e8c21c1fccef265a4b7505373d797fcc3 100644 (file)
@@ -1,6 +1,6 @@
 /* { dg-do compile } */
 /* { dg-options "-O -msve-vector-bits=2048 -g" } */
-/* { dg-final { check-function-bodies "**" "" { target lp64 } } } */
+/* { dg-final { check-function-bodies "**" "" "" { target lp64 } } } */
 
 #include <stdint.h>
 
index 04872493c86fc1d5b4cee6ea29c044afe260f4b5..9eb71e3dcc3ba460194587a318ec777da529c67b 100644 (file)
@@ -1,6 +1,6 @@
 /* { dg-do compile } */
 /* { dg-options "-O -msve-vector-bits=256 -g" } */
-/* { dg-final { check-function-bodies "**" "" { target lp64 } } } */
+/* { dg-final { check-function-bodies "**" "" "" { target lp64 } } } */
 
 #include <stdint.h>
 
index 9817d856a13866aa20045e7a4b4109a03db1c519..8b8d0c7c860d5e42a7da33b03306a004c6d68d58 100644 (file)
@@ -1,6 +1,6 @@
 /* { dg-do compile } */
 /* { dg-options "-O -msve-vector-bits=512 -g" } */
-/* { dg-final { check-function-bodies "**" "" { target lp64 } } } */
+/* { dg-final { check-function-bodies "**" "" "" { target lp64 } } } */
 
 #include <stdint.h>
 
index 7c4884d0e59b26945589efcbc9a5eae94fd3ef29..f9532d3ca7fc083914f0a9a1fca5ff4bbe87d048 100644 (file)
@@ -1,6 +1,6 @@
 /* { dg-do compile } */
 /* { dg-options "-O -mbig-endian -fno-shrink-wrap -fno-stack-clash-protection -g" } */
-/* { dg-final { check-function-bodies "**" "" { target lp64 } } } */
+/* { dg-final { check-function-bodies "**" "" "" { target lp64 } } } */
 
 void standard_callee (void);
 __attribute__((aarch64_vector_pcs)) void vpcs_callee (void);
index 872364f8752fae569f2151dfb11df09ee137263d..bbc4f84ec9f2d54ed4ed568751c96d2c24c288ae 100644 (file)
@@ -1,6 +1,6 @@
 /* { dg-do compile } */
 /* { dg-options "-O -mbig-endian -fshrink-wrap -fno-stack-clash-protection -g" } */
-/* { dg-final { check-function-bodies "**" "" { target lp64 } } } */
+/* { dg-final { check-function-bodies "**" "" "" { target lp64 } } } */
 
 void standard_callee (void);
 __attribute__((aarch64_vector_pcs)) void vpcs_callee (void);
index 4ba71c0abae31fbf5caec2bfc6a62ba5966c5516..8e734d47b599dc529acea91df235fedd104b41da 100644 (file)
@@ -1,6 +1,6 @@
 /* { dg-do compile } */
 /* { dg-options "-O -mlittle-endian -fno-shrink-wrap -fno-stack-clash-protection -g" } */
-/* { dg-final { check-function-bodies "**" "" { target lp64 } } } */
+/* { dg-final { check-function-bodies "**" "" "" { target lp64 } } } */
 
 void standard_callee (void);
 __attribute__((aarch64_vector_pcs)) void vpcs_callee (void);
index c3acd40facaf1c2d12570a778e33a6c367d3719e..fab393aec06a728bd0e6fa8abe6e27bd2794e6b7 100644 (file)
@@ -1,6 +1,6 @@
 /* { dg-do compile } */
 /* { dg-options "-O -mlittle-endian -fshrink-wrap -fno-stack-clash-protection -g" } */
-/* { dg-final { check-function-bodies "**" "" { target lp64 } } } */
+/* { dg-final { check-function-bodies "**" "" "" { target lp64 } } } */
 
 void standard_callee (void);
 __attribute__((aarch64_vector_pcs)) void vpcs_callee (void);
index 1fe86b0eac33c43568dfba85eb28f057559f3f25..2d29ce2c00070178f190c043aadf38fcb0c1de1b 100644 (file)
@@ -1,6 +1,6 @@
 /* { dg-do compile } */
 /* { dg-options "-O -g" } */
-/* { dg-final { check-function-bodies "**" "" { target lp64 } } } */
+/* { dg-final { check-function-bodies "**" "" "" { target lp64 } } } */
 
 #include <arm_sve.h>
 
index aa67bee255dac632312e1145b1af4352e269bac5..38a414cb4bd27605d5c697b402c194f7040b85b5 100644 (file)
@@ -1,6 +1,6 @@
 /* { dg-do compile } */
 /* { dg-options "-O -mbig-endian -fno-stack-clash-protection -g" } */
-/* { dg-final { check-function-bodies "**" "" { target lp64 } } } */
+/* { dg-final { check-function-bodies "**" "" "" { target lp64 } } } */
 
 void standard_callee (__SVInt8_t *);
 
index ab232d7ee7acf49ad54ba89cdd83f14999262767..f8fe5d1cc0d109ca63bcd5bcfa1e0d2de7df0438 100644 (file)
@@ -1,6 +1,6 @@
 /* { dg-do compile } */
 /* { dg-options "-O -mlittle-endian -fno-stack-clash-protection -g" } */
-/* { dg-final { check-function-bodies "**" "" { target lp64 } } } */
+/* { dg-final { check-function-bodies "**" "" "" { target lp64 } } } */
 
 void standard_callee (__SVInt8_t *);
 
index e41de101d799feec5b77762cc58ab7d003e77865..41193b411e6fa7aedc7c9883745655e560759467 100644 (file)
@@ -1,6 +1,6 @@
 /* { dg-do compile } */
 /* { dg-options "-O -fshrink-wrap -fstack-clash-protection -msve-vector-bits=128 -g" } */
-/* { dg-final { check-function-bodies "**" "" { target { aarch64_little_endian && lp64 } } } } */
+/* { dg-final { check-function-bodies "**" "" "" { target { aarch64_little_endian && lp64 } } } } */
 
 #pragma GCC aarch64 "arm_sve.h"
 
index 6987245a6fc2866830188962d74718365a449def..72960fd4ef26f34de42a77e20dfe6fc89671df97 100644 (file)
@@ -1,6 +1,6 @@
 /* { dg-do compile } */
 /* { dg-options "-O2 -fno-stack-clash-protection -g" } */
-/* { dg-final { check-function-bodies "**" "" { target lp64 } } } */
+/* { dg-final { check-function-bodies "**" "" "" { target lp64 } } } */
 
 #include <arm_sve.h>
 #include <stdarg.h>
index 79098851cd67e191048accd8b2c3f5509481a15b..9b9162051a73f4453a50ec09f1e3e7af5e29ff4c 100644 (file)
@@ -1,6 +1,6 @@
 /* { dg-do compile } */
 /* { dg-options "-O2 -fno-stack-clash-protection -g" } */
-/* { dg-final { check-function-bodies "**" "" { target lp64 } } } */
+/* { dg-final { check-function-bodies "**" "" "" { target lp64 } } } */
 
 #include <arm_sve.h>
 #include <stdarg.h>
index 325b0b2aaffd296aab8dc01c5c383ad69c18b98f..b979f43eac1a448760472210eddfae572f6585e1 100644 (file)
@@ -1,6 +1,6 @@
 /* { dg-do compile } */
 /* { dg-options "-O2 -fno-stack-clash-protection -g" } */
-/* { dg-final { check-function-bodies "**" "" { target lp64 } } } */
+/* { dg-final { check-function-bodies "**" "" "" { target lp64 } } } */
 
 #include <arm_sve.h>
 #include <stdarg.h>
index 07a6c707e05c60a4f07a6f1e14e433b3fa2eb6df..6f2235f02663ca906332bad59f5ce88f068e9925 100644 (file)
@@ -1,6 +1,6 @@
 /* { dg-do compile } */
 /* { dg-options "-O2 -fno-stack-clash-protection -g" } */
-/* { dg-final { check-function-bodies "**" "" { target lp64 } } } */
+/* { dg-final { check-function-bodies "**" "" "" { target lp64 } } } */
 
 #include <arm_sve.h>
 #include <stdarg.h>
index 1730638337d26ceb59441fe28bbebfcb57b34b30..523d3becdb7cbdec649c2398ed9706f28d8c36c7 100644 (file)
@@ -1,6 +1,6 @@
 /* { dg-do compile } */
 /* { dg-options "-O2 -fno-stack-clash-protection -g" } */
-/* { dg-final { check-function-bodies "**" "" { target lp64 } } } */
+/* { dg-final { check-function-bodies "**" "" "" { target lp64 } } } */
 
 #include <arm_sve.h>
 #include <stdarg.h>
index d93db8fc80e230ee99457af5ceb2c740fb36a89e..afde5a7151b4fde75752badd3bac381cf93d794b 100644 (file)
@@ -1,6 +1,6 @@
 /* { dg-do compile } */
 /* { dg-options "-O2 -fno-stack-clash-protection -g" } */
-/* { dg-final { check-function-bodies "**" "" { target lp64 } } } */
+/* { dg-final { check-function-bodies "**" "" "" { target lp64 } } } */
 
 #include <arm_sve.h>
 #include <stdarg.h>
index b8c77455d7d015efc405f2e5d6bf592853b98e67..d119d0ae356ef5f3e377595635d14b6f9edc7565 100644 (file)
@@ -1,6 +1,6 @@
 /* { dg-do compile } */
 /* { dg-options "-O2 -fno-stack-clash-protection -g" } */
-/* { dg-final { check-function-bodies "**" "" { target lp64 } } } */
+/* { dg-final { check-function-bodies "**" "" "" { target lp64 } } } */
 
 #include <arm_sve.h>
 #include <stdarg.h>
index de7cbe37d48613725842fcb314c9febb43260e93..ce6d663ae092344e13ae6de8d7fd73bd4a18977a 100644 (file)
@@ -1,6 +1,6 @@
 /* { dg-do compile } */
 /* { dg-options "-O2 -fno-stack-clash-protection -g" } */
-/* { dg-final { check-function-bodies "**" "" { target lp64 } } } */
+/* { dg-final { check-function-bodies "**" "" "" { target lp64 } } } */
 
 #include <arm_sve.h>
 #include <stdarg.h>
index 59c9ca7dbb8db8a76ce471a625a564fde2a2fdd7..50ae7ba2454d3f4508b6e899557826062ebb3bfd 100644 (file)
@@ -1,6 +1,6 @@
 /* { dg-do compile } */
 /* { dg-options "-O2 -fno-stack-clash-protection -g" } */
-/* { dg-final { check-function-bodies "**" "" { target lp64 } } } */
+/* { dg-final { check-function-bodies "**" "" "" { target lp64 } } } */
 
 #include <arm_sve.h>
 #include <stdarg.h>
index 3050ad5f6c132885162c9e6a04f490fe8c3c9758..d726c723df9f13ca5905a9121b8d3f4c12f73040 100644 (file)
@@ -1,6 +1,6 @@
 /* { dg-do compile } */
 /* { dg-options "-O2 -fno-stack-clash-protection -g" } */
-/* { dg-final { check-function-bodies "**" "" { target lp64 } } } */
+/* { dg-final { check-function-bodies "**" "" "" { target lp64 } } } */
 
 #include <arm_sve.h>
 #include <stdarg.h>
index 94322a34c79deb3e88144a63fb28b1a381f714e6..ef1265c88b1f721676b0059babc0d78f7328e67a 100644 (file)
@@ -1,6 +1,6 @@
 /* { dg-do compile } */
 /* { dg-options "-O2 -fno-stack-clash-protection -g" } */
-/* { dg-final { check-function-bodies "**" "" { target lp64 } } } */
+/* { dg-final { check-function-bodies "**" "" "" { target lp64 } } } */
 
 #include <arm_sve.h>
 #include <stdarg.h>
index cf8ac21711dcff3fb2450019cdc50fac5d64f29e..e6a82fed0bd99f7357ebd18afec19fc4ca8b853d 100644 (file)
@@ -1,6 +1,6 @@
 /* { dg-do compile } */
 /* { dg-options "-O2 -fno-stack-clash-protection -g" } */
-/* { dg-final { check-function-bodies "**" "" { target lp64 } } } */
+/* { dg-final { check-function-bodies "**" "" "" { target lp64 } } } */
 
 #include <arm_sve.h>
 #include <stdarg.h>
index f7d27735112f8edd8a39a326020c3d08dd36e765..8d2364f93a9b82e3e2a7aac6a0cf4fdd34b8f5fd 100644 (file)
@@ -617,7 +617,7 @@ proc check-function-bodies { args } {
     }
 
     if { [llength $args] >= 3 } {
-       set required_flag [lindex $args 2]
+       set required_flags [lindex $args 2]
 
        upvar 2 dg-extra-tool-flags extra_tool_flags
        set flags $extra_tool_flags
@@ -626,8 +626,18 @@ proc check-function-bodies { args } {
        if { [info exists torture_current_flags] } {
            append flags " " $torture_current_flags
        }
-       if { ![regexp " $required_flag " $flags] } {
-           return
+       foreach required_flag $required_flags {
+           switch -- $required_flag {
+               target -
+               xfail {
+                   error "misplaced $required_flag in check-function-bodies"
+               }
+           }
+       }
+       foreach required_flag $required_flags {
+           if { ![regexp " $required_flag " $flags] } {
+               return
+           }
        }
     }