]> git.ipfire.org Git - thirdparty/gcc.git/commit
c++: improve C++ testsuite default versions
authorJason Merrill <jason@redhat.com>
Fri, 26 Jul 2024 19:10:50 +0000 (15:10 -0400)
committerThomas Koenig <tkoenig@gcc.gnu.org>
Sun, 28 Jul 2024 17:06:02 +0000 (19:06 +0200)
commit557373c0cd6c0d6b4a1e46dc7a53d929b60b3c9b
tree792226ac6e8ff7de3a8eafbd3d3099c1b7486989
parent262163238006aa39eff5ebd8283ec7254161269a
c++: improve C++ testsuite default versions

I wanted to add more cases to the setting of std_list in g++-dg.exp, but
didn't want to do a full scan through the file for each case.  So this patch
improves that in two ways: first, by extracting all interesting lines on a
single pass; second, by generating the list more flexibly: now we test every
version mentioned explicitly in the testcase, plus a few more if fewer than
three are mentioned.

This also lowers changes from testing four to three versions for most
testcases: the current default and the earliest and latest versions.  This
will reduce testing of C++14 and C++20 modes, and increase testing of C++26
mode.  C++ front-end developers are encouraged to set the
GXX_TESTSUITE_STDS environment variable to test more modes.

gcc/testsuite/ChangeLog:

* lib/gcc-dg.exp (get_matching_lines): New.
* lib/g++-dg.exp: Improve std_list selection.
gcc/testsuite/lib/g++-dg.exp
gcc/testsuite/lib/gcc-dg.exp