https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114384
--- Comment #4 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Libstdc++ uses the same effective-target keywords, but uses its own variables
to override the defaults:
# Allow v3_std_list to be set in configuration files, e.g., ~/.dejagnurc
if ![info exists v3_std_list] {
set v3_std_list { }
}
# Allow v3_std_list to be set from the environment.
if [info exists env(GLIBCXX_TESTSUITE_STDS)] {
set v3_std_list [split $env(GLIBCXX_TESTSUITE_STDS) ","]
}
and defaults to -std=gnu++NN unless { dg-add-options strict_std } is present:
# If the testcase specifies a standard, use that one.
# If not, run it under several standards, allowing GNU extensions
# unless strict_std is requested.
if ![search_for $test "// \{ dg-*options*-std=*++"] {
if [search_for $test "{ dg-add-options strict_std }"] {
set std_prefix "-std=c++"
} else {
set std_prefix "-std=gnu++"
}
# See above for the initial value of this list.
global v3_std_list
if { [llength $v3_std_list] > 0 } {
set std_list $v3_std_list
} else {
# If the test requires a newer C++ version than which
# is tested by default, use that C++ version for that
# single test.
# These should be adjusted whenever the default -std is
# updated or newer C++ effective target is added.
set default_std 17
set max_std 26
set min_std [v3-minimum-std $test $default_std $max_std]
if { $min_std > $default_std } {
set std_list $min_std
if { $min_std != $max_std } {
# Also test the latest version.
lappend std_list "$max_std"
}
} else {
# Only run each test once with the default -std option.
# This avoids increasing the run time for most testers.
# Libstdc++ developers can override this with v3_std_list.
set std_list $default_std
}
}
For libstdc++ this is covered (briefly) in
https://gcc.gnu.org/onlinedocs/libstdc++/manual/test.html#test.run.permutations
and https://gcc.gnu.org/onlinedocs/libstdc++/manual/test.html#test.new_tests