public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [pushed] testsuite: run C++11 tests in C++11 mode
@ 2023-07-26  1:44 Jason Merrill
  0 siblings, 0 replies; only message in thread
From: Jason Merrill @ 2023-07-26  1:44 UTC (permalink / raw)
  To: gcc-patches

Tested x86_64-pc-linux-gnu, applying to trunk.

-- 8< --

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.
---
 gcc/testsuite/lib/g++-dg.exp | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/gcc/testsuite/lib/g++-dg.exp b/gcc/testsuite/lib/g++-dg.exp
index 046d63170c8..142c52c8426 100644
--- a/gcc/testsuite/lib/g++-dg.exp
+++ b/gcc/testsuite/lib/g++-dg.exp
@@ -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 }
 		}

base-commit: 50656980497d77ac12a5e7179013a6af09ba32f7
-- 
2.39.3


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2023-07-26  1:44 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-07-26  1:44 [pushed] testsuite: run C++11 tests in C++11 mode Jason Merrill

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).