These tests were backported from gcc-14 where the testsuite
automatically adds -std=gnu++20 as needed. That doesn't happen on the
older release branches, so an explicit dg-options directive is needed to
ensure the tests are run by default. Otherwise they'll only be run when
somebody uses a custom --target_board that includes -std=gnu++20.
For 29_atomics/headers/stdatomic.h/115807.cc we need to compile with
-std=gnu++23 instead.
libstdc++-v3/ChangeLog:
* testsuite/20_util/integer_sequence/112473.cc: Compile with
-std=gnu++20.
* testsuite/21_strings/char_traits/requirements/113200.cc:
Likewise.
* testsuite/23_containers/array/comparison_operators/106212.cc:
Likewise.
* testsuite/23_containers/span/117966.cc: Likewise.
* testsuite/23_containers/vector/cons/113841.cc: Compile with
-std=gnu++20.
* testsuite/24_iterators/move_iterator/lwg3736.cc: Likewise.
* testsuite/25_algorithms/lexicographical_compare_three_way/113960.cc:
Likewise.
* testsuite/27_io/filesystem/iterators/lwg3480.cc: Likewise.
* testsuite/29_atomics/headers/stdatomic.h/115807.cc: Compile
with -std=gnu++23.
* testsuite/std/ranges/subrange/lwg3589.cc: Likewise.
* testsuite/std/time/month/2.cc: Likewise.
* testsuite/std/time/weekday/2.cc: Likewise.
(cherry picked from commit
4182fa87758d5a94c1f6d71f471842207e56f933)
+// { dg-options "-std=gnu++20" }
// { dg-do compile { target c++20 } }
// PR libstdc++/112473 - integer_sequence accepts non-integer types
+// { dg-options "-std=gnu++20" }
// { dg-do compile { target c++20 } }
// PR libstdc++/113200
-// { dg-options "-D_GLIBCXX_DEBUG" }
+// { dg-options "-D_GLIBCXX_DEBUG -std=gnu++20" }
// { dg-do compile { target c++20 } }
// Bug libstdc++/106212 - Code becomes non-constexpr with _GLIBCXX_DEBUG
-// { dg-options "-D_GLIBCXX_DEBUG" }
+// { dg-options "-D_GLIBCXX_DEBUG -std=gnu++20" }
// { dg-do compile { target c++20 } }
// Bug 117966
+// { dg-options "-std=gnu++20" }
// { dg-do compile { target c++20 } }
#include <vector>
+// { dg-options "-std=gnu++20" }
// { dg-do compile { target c++20 } }
// 3736. move_iterator missing disable_sized_sentinel_for specialization
+// { dg-options "-std=gnu++20" }
// { dg-do run { target c++20 } }
// PR libstdc++/113960
+// { dg-options "-std=gnu++20" }
// { dg-do compile { target c++20 } }
// { dg-require-filesystem-ts "" }
+// { dg-options "-std=gnu++23" }
// { dg-do compile { target c++23 } }
#include <stdatomic.h>
namespace other {
+// { dg-options "-std=gnu++20" }
// { dg-do compile { target c++20 } }
// LWG 3589. The const lvalue reference overload of get for subrange does not
+// { dg-options "-std=gnu++20" }
// { dg-do run { target c++20 } }
// Class month [time.cal.month]
+// { dg-options "-std=gnu++20" }
// { dg-do run { target c++20 } }
// Class weekday [time.cal.wd]