testsuite: run C++11 tests in C++11 mode

A recent change missed updating constexpr-mutable3.C because it wasn't run
in C++11 mode even though it checks the behavior for { target c++11_only }.

gcc/testsuite/ChangeLog:

	* lib/g++-dg.exp (g++-dg-runtest): Check for c++11_only.
This commit is contained in:
Jason Merrill 2023-07-25 15:39:31 -04:00
parent af37e3948f
commit 2ace6cd694

View file

@ -55,13 +55,16 @@ proc g++-dg-runtest { testcases flags default-extra-flags } {
} else {
# If the test requires a newer C++ version than which
# is tested by default, use that C++ version for that
# single test. This should be updated or commented
# out whenever the default std_list is updated or newer
# C++ effective target is added.
# single test. Or if a test checks behavior specifically for
# one C++ version, include that version in the default list.
# These should be adjusted whenever the default std_list is
# updated or newer C++ effective target is added.
if [search_for $test "\{ dg-do * \{ target c++23"] {
set std_list { 23 26 }
} elseif [search_for $test "\{ dg-do * \{ target c++26"] {
set std_list { 26 }
} elseif [search_for $test "c++11_only"] {
set std_list { 98 11 14 20 }
} else {
set std_list { 98 14 17 20 }
}