+2020-01-23 Richard Sandiford <richard.sandiford@arm.com>
+
+ * doc/sourcebuild.texi (check-function-bodies): Add an
+ optional target/xfail selector.
+
2020-01-23 Richard Sandiford <richard.sandiford@arm.com>
PR rtl-optimization/93124
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}]
+@item check-function-bodies @var{prefix} @var{terminator} [@var{option} [@{ 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
+2020-01-23 Richard Sandiford <richard.sandiford@arm.com>
+
+ * lib/scanasm.exp (check-function-bodies): Add an optional
+ target/xfail selector.
+
2020-01-23 Richard Sandiford <richard.sandiford@arm.com>
* gcc.dg/torture/pr93124.c: New test.
# Check the implementations of functions against expected output. Used as:
#
-# { dg-do { check-function-bodies PREFIX TERMINATOR[ OPTION] } }
+# { dg-do { check-function-bodies PREFIX TERMINATOR[ OPTION[ SELECTOR]] } }
#
# See sourcebuild.texi for details.
if { [llength $args] < 2 } {
error "too few arguments to check-function-bodies"
}
- if { [llength $args] > 3 } {
+ if { [llength $args] > 4 } {
error "too many arguments to check-function-bodies"
}
- if { [llength $args] == 3 } {
+ if { [llength $args] >= 3 } {
set required_flag [lindex $args 2]
upvar 2 dg-extra-tool-flags extra_tool_flags
}
}
+ set xfail_all 0
+ if { [llength $args] >= 4 } {
+ switch [dg-process-target [lindex $args 3]] {
+ "S" { }
+ "N" { return }
+ "F" { set xfail_all 1 }
+ "P" { }
+ }
+ }
+
set testcase [testname-for-summary]
# The name might include a list of options; extract the file name.
set filename [lindex $testcase 0]
}
} elseif { [string equal -length $terminator_len $line $terminator] } {
if { ![string equal $selector "N"] } {
- if { [string equal $selector "F"] } {
+ if { $xfail_all || [string equal $selector "F"] } {
setup_xfail "*-*-*"
}
set testname "$testcase check-function-bodies $function_name"