summaryrefslogtreecommitdiff
path: root/gcc/testsuite/lib
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/lib')
-rw-r--r--gcc/testsuite/lib/gcc-dg.exp17
-rw-r--r--gcc/testsuite/lib/scanasm.exp44
-rw-r--r--gcc/testsuite/lib/scandump.exp20
-rw-r--r--gcc/testsuite/lib/target-supports.exp74
4 files changed, 85 insertions, 70 deletions
diff --git a/gcc/testsuite/lib/gcc-dg.exp b/gcc/testsuite/lib/gcc-dg.exp
index d8f9b7bd2bb..98366dc1fc3 100644
--- a/gcc/testsuite/lib/gcc-dg.exp
+++ b/gcc/testsuite/lib/gcc-dg.exp
@@ -1092,24 +1092,27 @@ proc process-message { msgproc msgprefix dgargs } {
set newentry [lindex ${dg-messages} end]
set expmsg [lindex $newentry 2]
+ set column ""
# Handle column numbers from the specified expression (if there is
# one) and set up the search expression that will be used by DejaGnu.
- if [regexp "^(\[0-9\]+):" $expmsg "" column] {
+ if [regexp {^-:} $expmsg] {
+ # The expected column is -, so shouldn't appear.
+ set expmsg [string range $expmsg 2 end]
+ } elseif [regexp {^[0-9]+:} $expmsg column] {
# The expression in the directive included a column number.
- # Remove "COLUMN:" from the original expression and move it
+ # Remove it from the original expression and move it
# to the proper place in the search expression.
- regsub "^\[0-9\]+:" $expmsg "" expmsg
- set expmsg "$column: $msgprefix\[^\n\]*$expmsg"
+ set expmsg [string range $expmsg [string length $column] end]
} elseif [string match "" [lindex $newentry 0]] {
# The specified line number is 0; don't expect a column number.
- set expmsg "$msgprefix\[^\n\]*$expmsg"
} else {
# There is no column number in the search expression, but we
# should expect one in the message itself.
- set expmsg "\[0-9\]+: $msgprefix\[^\n\]*$expmsg"
+ set column {[0-9]+:}
}
-
+ set expmsg "$column $msgprefix\[^\n\]*$expmsg"
set newentry [lreplace $newentry 2 2 $expmsg]
+
set dg-messages [lreplace ${dg-messages} end end $newentry]
verbose "process-message:\n${dg-messages}" 2
}
diff --git a/gcc/testsuite/lib/scanasm.exp b/gcc/testsuite/lib/scanasm.exp
index a66bb282531..33286152f30 100644
--- a/gcc/testsuite/lib/scanasm.exp
+++ b/gcc/testsuite/lib/scanasm.exp
@@ -78,7 +78,9 @@ proc dg-scan { name positive testcase output_file orig_args } {
proc scan-assembler { args } {
set testcase [testname-for-summary]
- set output_file "[file rootname [file tail $testcase]].s"
+ # The name might include a list of options; extract the file name.
+ set filename [lindex $testcase 0]
+ set output_file "[file rootname [file tail $filename]].s"
dg-scan "scan-assembler" 1 $testcase $output_file $args
}
@@ -89,7 +91,9 @@ force_conventional_output_for scan-assembler
proc scan-assembler-not { args } {
set testcase [testname-for-summary]
- set output_file "[file rootname [file tail $testcase]].s"
+ # The name might include a list of options; extract the file name.
+ set filename [lindex $testcase 0]
+ set output_file "[file rootname [file tail $filename]].s"
dg-scan "scan-assembler-not" 0 $testcase $output_file $args
}
@@ -117,7 +121,9 @@ proc hidden-scan-for { symbol } {
proc scan-hidden { args } {
set testcase [testname-for-summary]
- set output_file "[file rootname [file tail $testcase]].s"
+ # The name might include a list of options; extract the file name.
+ set filename [lindex $testcase 0]
+ set output_file "[file rootname [file tail $filename]].s"
set symbol [lindex $args 0]
@@ -133,7 +139,9 @@ proc scan-hidden { args } {
proc scan-not-hidden { args } {
set testcase [testname-for-summary]
- set output_file "[file rootname [file tail $testcase]].s"
+ # The name might include a list of options; extract the file name.
+ set filename [lindex $testcase 0]
+ set output_file "[file rootname [file tail $filename]].s"
set symbol [lindex $args 0]
set hidden_scan [hidden-scan-for $symbol]
@@ -163,7 +171,9 @@ proc scan-file-not { output_file args } {
proc scan-stack-usage { args } {
set testcase [testname-for-summary]
- set output_file "[file rootname [file tail $testcase]].su"
+ # The name might include a list of options; extract the file name.
+ set filename [lindex $testcase 0]
+ set output_file "[file rootname [file tail $filename]].su"
dg-scan "scan-file" 1 $testcase $output_file $args
}
@@ -173,7 +183,9 @@ proc scan-stack-usage { args } {
proc scan-stack-usage-not { args } {
set testcase [testname-for-summary]
- set output_file "[file rootname [file tail $testcase]].su"
+ # The name might include a list of options; extract the file name.
+ set filename [lindex $testcase 0]
+ set output_file "[file rootname [file tail $filename]].su"
dg-scan "scan-file-not" 0 $testcase $output_file $args
}
@@ -230,12 +242,14 @@ proc scan-assembler-times { args } {
}
set testcase [testname-for-summary]
+ # The name might include a list of options; extract the file name.
+ set filename [lindex $testcase 0]
set pattern [lindex $args 0]
set times [lindex $args 1]
set pp_pattern [make_pattern_printable $pattern]
# This must match the rule in gcc-dg.exp.
- set output_file "[file rootname [file tail $testcase]].s"
+ set output_file "[file rootname [file tail $filename]].s"
set files [glob -nocomplain $output_file]
if { $files == "" } {
@@ -292,9 +306,11 @@ proc scan-assembler-dem { args } {
}
set testcase [testname-for-summary]
+ # The name might include a list of options; extract the file name.
+ set filename [lindex $testcase 0]
set pattern [lindex $args 0]
set pp_pattern [make_pattern_printable $pattern]
- set output_file "[file rootname [file tail $testcase]].s"
+ set output_file "[file rootname [file tail $filename]].s"
set files [glob -nocomplain $output_file]
if { $files == "" } {
@@ -346,9 +362,11 @@ proc scan-assembler-dem-not { args } {
}
set testcase [testname-for-summary]
+ # The name might include a list of options; extract the file name.
+ set filename [lindex $testcase 0]
set pattern [lindex $args 0]
set pp_pattern [make_pattern_printable $pattern]
- set output_file "[file rootname [file tail $testcase]].s"
+ set output_file "[file rootname [file tail $filename]].s"
set files [glob -nocomplain $output_file]
if { $files == "" } {
@@ -401,6 +419,8 @@ proc object-size { args } {
}
set testcase [testname-for-summary]
+ # The name might include a list of options; extract the file name.
+ set filename [lindex $testcase 0]
set what [lindex $args 0]
set where [lsearch { text data bss total } $what]
if { $where == -1 } {
@@ -418,7 +438,7 @@ proc object-size { args } {
return
}
- set output_file "[file rootname [file tail $testcase]].o"
+ set output_file "[file rootname [file tail $filename]].o"
if ![file_on_host exists $output_file] {
verbose -log "$testcase: $output_file does not exist"
unresolved "$testcase object-size $what $cmp $with"
@@ -512,7 +532,9 @@ proc dg-function-on-line { args } {
proc scan-lto-assembler { args } {
set testcase [testname-for-summary]
- set output_file "[file rootname [file tail $testcase]].exe.ltrans0.s"
+ # The name might include a list of options; extract the file name.
+ set filename [lindex $testcase 0]
+ set output_file "[file rootname [file tail $filename]].exe.ltrans0.s"
verbose "output_file: $output_file"
dg-scan "scan-assembler" 1 $testcase $output_file $args
}
diff --git a/gcc/testsuite/lib/scandump.exp b/gcc/testsuite/lib/scandump.exp
index 4a64ac6e05d..a2425a23c1e 100644
--- a/gcc/testsuite/lib/scandump.exp
+++ b/gcc/testsuite/lib/scandump.exp
@@ -45,11 +45,13 @@ proc scan-dump { args } {
}
set testcase [testname-for-summary]
+ # The name might include a list of options; extract the file name.
+ set filename [lindex $testcase 0]
set printable_pattern [make_pattern_printable [lindex $args 1]]
set suf [dump-suffix [lindex $args 2]]
set testname "$testcase scan-[lindex $args 0]-dump $suf \"$printable_pattern\""
- set src [file tail [lindex $testcase 0]]
+ set src [file tail $filename]
set output_file "[glob -nocomplain $src.[lindex $args 2]]"
if { $output_file == "" } {
verbose -log "$testcase: dump file does not exist"
@@ -86,11 +88,13 @@ proc scan-dump-times { args } {
}
set testcase [testname-for-summary]
+ # The name might include a list of options; extract the file name.
+ set filename [lindex $testcase 0]
set times [lindex $args 2]
set suf [dump-suffix [lindex $args 3]]
set printable_pattern [make_pattern_printable [lindex $args 1]]
set testname "$testcase scan-[lindex $args 0]-dump-times $suf \"$printable_pattern\" [lindex $args 2]"
- set src [file tail [lindex $testcase 0]]
+ set src [file tail $filename]
set output_file "[glob -nocomplain $src.[lindex $args 3]]"
if { $output_file == "" } {
verbose -log "$testcase: dump file does not exist"
@@ -128,10 +132,12 @@ proc scan-dump-not { args } {
}
set testcase [testname-for-summary]
+ # The name might include a list of options; extract the file name.
+ set filename [lindex $testcase 0]
set printable_pattern [make_pattern_printable [lindex $args 1]]
set suf [dump-suffix [lindex $args 2]]
set testname "$testcase scan-[lindex $args 0]-dump-not $suf \"$printable_pattern\""
- set src [file tail [lindex $testcase 0]]
+ set src [file tail $filename]
set output_file "[glob -nocomplain $src.[lindex $args 2]]"
if { $output_file == "" } {
verbose -log "$testcase: dump file does not exist"
@@ -181,10 +187,12 @@ proc scan-dump-dem { args } {
}
set testcase [testname-for-summary]
+ # The name might include a list of options; extract the file name.
+ set filename [lindex $testcase 0]
set printable_pattern [make_pattern_printable [lindex $args 1]]
set suf [dump-suffix [lindex $args 2]]
set testname "$testcase scan-[lindex $args 0]-dump-dem $suf \"$printable_pattern\""
- set src [file tail [lindex $testcase 0]]
+ set src [file tail $filename]
set output_file "[glob -nocomplain $src.[lindex $args 2]]"
if { $output_file == "" } {
verbose -log "$testcase: dump file does not exist"
@@ -233,10 +241,12 @@ proc scan-dump-dem-not { args } {
}
set testcase [testname-for-summary]
+ # The name might include a list of options; extract the file name.
+ set filename [lindex $testcase 0]
set printable_pattern [make_pattern_printable [lindex $args 1]
set suf [dump-suffix [lindex $args 2]]
set testname "$testcase scan-[lindex $args 0]-dump-dem-not $suf \"$printable_pattern\""
- set src [file tail [lindex $testcase 0]]
+ set src [file tail $filename]
set output_file "[glob -nocomplain $src.[lindex $args 2]]"
if { $output_file == "" } {
verbose -log "$testcase: dump file does not exist"
diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp
index b2096723426..fc656b96b6a 100644
--- a/gcc/testsuite/lib/target-supports.exp
+++ b/gcc/testsuite/lib/target-supports.exp
@@ -1175,8 +1175,8 @@ proc check_effective_target_pie { } {
return 1;
}
if { [istarget *-*-solaris2.1\[1-9\]*] } {
- # Full PIE support was added in Solaris 11.x and Solaris 12, but gcc
- # errors out if missing, so check for that.
+ # Full PIE support was added in Solaris 11.3, but gcc errors out
+ # if missing, so check for that.
return [check_no_compiler_messages pie executable {
int main (void) { return 0; }
} "-pie -fpie"]
@@ -3450,6 +3450,19 @@ proc check_effective_target_arm_vect_no_misalign { } {
}
+# Return 1 if this is an ARM target supporting -mfloat-abi=soft. Some
+# multilibs may be incompatible with this option.
+
+proc check_effective_target_arm_soft_ok { } {
+ if { [check_effective_target_arm32] } {
+ return [check_no_compiler_messages arm_soft_ok executable {
+ int main() { return 0;}
+ } "-mfloat-abi=soft"]
+ } else {
+ return 0
+ }
+}
+
# Return 1 if this is an ARM target supporting -mfpu=vfp
# -mfloat-abi=softfp. Some multilibs may be incompatible with these
# options.
@@ -5700,14 +5713,6 @@ proc check_effective_target_vect_perm3_int { } {
&& [vect_perm_supported 3 32] }]
}
-# Return 1 if the target supports SLP permutation of 5 vectors when each
-# element has 32 bits.
-
-proc check_effective_target_vect_perm5_int { } {
- return [expr { [check_effective_target_vect_perm]
- && [vect_perm_supported 5 32] }]
-}
-
# Return 1 if the target plus current options supports vector permutation
# on byte-sized elements, 0 otherwise.
#
@@ -6542,6 +6547,12 @@ proc check_effective_target_vect_masked_store { } {
return [check_effective_target_aarch64_sve]
}
+# Return 1 if the target supports vector scatter stores.
+
+proc check_effective_target_vect_scatter_store { } {
+ return [check_effective_target_aarch64_sve]
+}
+
# Return 1 if the target supports vector conditional operations, 0 otherwise.
proc check_effective_target_vect_condition { } {
@@ -6844,12 +6855,6 @@ proc check_effective_target_vect64 { } {
return [expr { [lsearch -exact [available_vector_sizes] 64] >= 0 }]
}
-# Return 1 if the target supports vectors of 256 bits.
-
-proc check_effective_target_vect256 { } {
- return [expr { [lsearch -exact [available_vector_sizes] 256] >= 0 }]
-}
-
# Return 1 if the target supports vector copysignf calls.
proc check_effective_target_vect_call_copysignf { } {
@@ -7176,42 +7181,21 @@ proc check_effective_target_vect_call_roundf { } {
return $et_vect_call_roundf_saved($et_index)
}
-# Return 1 if the target supports vector gather operations.
-
-proc check_effective_target_vect_gather { } {
- return [check_effective_target_aarch64_sve]
-}
-
-# Return 1 if the target supports vector scatter operations.
-
-proc check_effective_target_vect_scatter { } {
- return [check_effective_target_aarch64_sve]
-}
-
-# Return 1 if the target supports both vector gather and vector scatter
-# operations.
-
-proc check_effective_target_vect_gather_scatter { } {
- return [expr { [check_effective_target_vect_gather]
- && [check_effective_target_vect_scatter] }]
-}
-
-# Return 1 if the target supports a non-reassociating form of floating-point
-# addition reduction, i.e. one that is suitable for -fno-associative-math.
+# Return 1 if the target supports AND, OR and XOR reduction.
-proc check_effective_target_vect_ieee_add_reduc { } {
+proc check_effective_target_vect_logical_reduc { } {
return [check_effective_target_aarch64_sve]
}
-# Return 1 if the target supports AND, OR and XOR reduction.
+# Return 1 if the target supports the fold_extract_last optab.
-proc check_effective_target_vect_logical_reduc { } {
+proc check_effective_target_vect_fold_extract_last { } {
return [check_effective_target_aarch64_sve]
}
-# Return 1 if the target supports last-selected-element reduction.
+# Return 1 if the target supports the fold_left_plus optab.
-proc check_effective_target_vect_last_reduc { } {
+proc check_effective_target_vect_fold_left_plus { } {
return [check_effective_target_aarch64_sve]
}
@@ -9204,10 +9188,6 @@ proc check_effective_target_supports_stack_clash_protection { } {
# Return 1 if the target creates a frame pointer for non-leaf functions
# Note we ignore cases where we apply tail call optimization here.
proc check_effective_target_frame_pointer_for_non_leaf { } {
- if { [istarget aarch*-*-*] } {
- return 1
- }
-
# Solaris/x86 defaults to -fno-omit-frame-pointer.
if { [istarget i?86-*-solaris*] || [istarget x86_64-*-solaris*] } {
return 1