aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/lib
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/lib')
-rw-r--r--gcc/testsuite/lib/gcc-dg.exp5
-rw-r--r--gcc/testsuite/lib/multiline.exp7
-rw-r--r--gcc/testsuite/lib/prune.exp7
-rw-r--r--gcc/testsuite/lib/target-supports.exp30
4 files changed, 40 insertions, 9 deletions
diff --git a/gcc/testsuite/lib/gcc-dg.exp b/gcc/testsuite/lib/gcc-dg.exp
index 01c8c02..28529f5 100644
--- a/gcc/testsuite/lib/gcc-dg.exp
+++ b/gcc/testsuite/lib/gcc-dg.exp
@@ -364,6 +364,11 @@ proc gcc-dg-prune { system text } {
# Always remember to clear it in .exp file after executed all tests.
global dg_runtest_extra_prunes
+ # Call into multiline.exp to handle any multiline output directives.
+ # This is done before the check for blank lines so that multiline
+ # output directives can have blank lines within them.
+ set text [handle-multiline-outputs $text]
+
# Complain about blank lines in the output (PR other/69006)
global allow_blank_lines
if { !$allow_blank_lines } {
diff --git a/gcc/testsuite/lib/multiline.exp b/gcc/testsuite/lib/multiline.exp
index 73621a0..4c25bb7 100644
--- a/gcc/testsuite/lib/multiline.exp
+++ b/gcc/testsuite/lib/multiline.exp
@@ -139,7 +139,7 @@ proc dg-end-multiline-output { args } {
verbose "within dg-end-multiline-output: multiline_expected_outputs: $multiline_expected_outputs" 3
}
-# Hook to be called by prune.exp's prune_gcc_output to
+# Hook to be called by gcc-dg.exp's gcc-dg-prune to
# look for the expected multiline outputs, pruning them,
# reporting PASS for those that are found, and FAIL for
# those that weren't found.
@@ -149,6 +149,11 @@ proc dg-end-multiline-output { args } {
proc handle-multiline-outputs { text } {
global multiline_expected_outputs
global testname_with_flags
+
+ # If dg-enable-nn-line-numbers was provided, then obscure source-margin
+ # line numbers by converting them to "NN" form.
+ set text [maybe-handle-nn-line-numbers $text]
+
set index 0
foreach entry $multiline_expected_outputs {
verbose " entry: $entry" 3
diff --git a/gcc/testsuite/lib/prune.exp b/gcc/testsuite/lib/prune.exp
index cfe427c..8d37b24 100644
--- a/gcc/testsuite/lib/prune.exp
+++ b/gcc/testsuite/lib/prune.exp
@@ -108,13 +108,6 @@ proc prune_gcc_output { text } {
# Many tests that use visibility will still pass on platforms that don't support it.
regsub -all "(^|\n)\[^\n\]*lto1: warning: visibility attribute not supported in this configuration; ignored\[^\n\]*" $text "" text
- # If dg-enable-nn-line-numbers was provided, then obscure source-margin
- # line numbers by converting them to "NN" form.
- set text [maybe-handle-nn-line-numbers $text]
-
- # Call into multiline.exp to handle any multiline output directives.
- set text [handle-multiline-outputs $text]
-
#send_user "After:$text\n"
return $text
diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp
index d79ad4b..c04db2b 100644
--- a/gcc/testsuite/lib/target-supports.exp
+++ b/gcc/testsuite/lib/target-supports.exp
@@ -10785,7 +10785,35 @@ proc check_effective_target_c++23_only { } {
return 0
}
proc check_effective_target_c++23 { } {
- return [check_effective_target_c++23_only]
+ if [check_effective_target_c++23_only] {
+ return 1
+ }
+ return [check_effective_target_c++26]
+}
+
+proc check_effective_target_c++23_down { } {
+ if ![check_effective_target_c++] {
+ return 0
+ }
+ return [expr ![check_effective_target_c++26] ]
+}
+
+proc check_effective_target_c++26_only { } {
+ global cxx_default
+ if ![check_effective_target_c++] {
+ return 0
+ }
+ if [check-flags { { } { } { -std=c++26 -std=gnu++26 -std=c++2c -std=gnu++2c } }] {
+ return 1
+ }
+ if { $cxx_default == "c++26" && [check-flags { { } { } { } { -std=* } }] } {
+ return 1
+ }
+ return 0
+}
+
+proc check_effective_target_c++26 { } {
+ return [check_effective_target_c++26_only]
}
# Check for C++ Concepts support, i.e. -fconcepts flag.