I've pushed this to gcc-11 after testing on x86_64-linux.
-- >8 --
Backport the prune.exp change from r12-4425-g1595fe44e11a96 to fix two
testsuite failures when testing with -O0:
FAIL: 20_util/uses_allocator/69293_neg.cc (test for excess errors)
FAIL: 20_util/uses_allocator/cons_neg.cc (test for excess errors)
Also force some 20_util/integer_comparisons/ xfail tests to use -O2 so
that the errors match the dg-error directives.
libstdc++-v3/ChangeLog:
* testsuite/20_util/integer_comparisons/greater_equal_neg.cc:
Add -O2 to dg-options.
* testsuite/20_util/integer_comparisons/greater_neg.cc:
Likewise.
* testsuite/20_util/integer_comparisons/less_equal_neg.cc:
Likewise.
* testsuite/lib/prune.exp: Prune 'in constexpr expansion'.
---
.../testsuite/20_util/integer_comparisons/greater_equal_neg.cc | 2 +-
.../testsuite/20_util/integer_comparisons/greater_neg.cc | 2 +-
.../testsuite/20_util/integer_comparisons/less_equal_neg.cc | 2 +-
libstdc++-v3/testsuite/lib/prune.exp | 1 +
4 files changed, 4 insertions(+), 3 deletions(-)
diff --git
a/libstdc++-v3/testsuite/20_util/integer_comparisons/greater_equal_neg.cc
b/libstdc++-v3/testsuite/20_util/integer_comparisons/greater_equal_neg.cc
index 62633262948..028dce3df51 100644
--- a/libstdc++-v3/testsuite/20_util/integer_comparisons/greater_equal_neg.cc
+++ b/libstdc++-v3/testsuite/20_util/integer_comparisons/greater_equal_neg.cc
@@ -15,7 +15,7 @@
// with this library; see the file COPYING3. If not see
// <http://www.gnu.org/licenses/>.
-// { dg-options "-std=gnu++2a" }
+// { dg-options "-std=gnu++2a -O2" }
// { dg-do compile { target c++2a } }
#include <utility>
diff --git a/libstdc++-v3/testsuite/20_util/integer_comparisons/greater_neg.cc
b/libstdc++-v3/testsuite/20_util/integer_comparisons/greater_neg.cc
index 48cb64d5676..f0422bc1948 100644
--- a/libstdc++-v3/testsuite/20_util/integer_comparisons/greater_neg.cc
+++ b/libstdc++-v3/testsuite/20_util/integer_comparisons/greater_neg.cc
@@ -15,7 +15,7 @@
// with this library; see the file COPYING3. If not see
// <http://www.gnu.org/licenses/>.
-// { dg-options "-std=gnu++2a" }
+// { dg-options "-std=gnu++2a -O2" }
// { dg-do compile { target c++2a } }
#include <utility>
diff --git
a/libstdc++-v3/testsuite/20_util/integer_comparisons/less_equal_neg.cc
b/libstdc++-v3/testsuite/20_util/integer_comparisons/less_equal_neg.cc
index a16b36a83c9..3bd5d6480fe 100644
--- a/libstdc++-v3/testsuite/20_util/integer_comparisons/less_equal_neg.cc
+++ b/libstdc++-v3/testsuite/20_util/integer_comparisons/less_equal_neg.cc
@@ -15,7 +15,7 @@
// with this library; see the file COPYING3. If not see
// <http://www.gnu.org/licenses/>.
-// { dg-options "-std=gnu++2a" }
+// { dg-options "-std=gnu++2a -O2" }
// { dg-do compile { target c++2a } }
#include <utility>
diff --git a/libstdc++-v3/testsuite/lib/prune.exp
b/libstdc++-v3/testsuite/lib/prune.exp
index 6c905631f16..2ebfb922ef4 100644
--- a/libstdc++-v3/testsuite/lib/prune.exp
+++ b/libstdc++-v3/testsuite/lib/prune.exp
@@ -46,6 +46,7 @@ proc libstdc++-dg-prune { system text } {
regsub -all "(^|\n)\[^\n\]*(: )?At (top level|global scope):\[^\n\]*"
$text "" text
regsub -all "(^|\n)\[^\n\]*: (recursively )?required \[^\n\]*" $text ""
text
regsub -all "(^|\n)\[^\n\]*: . skipping \[0-9\]* instantiation contexts
\[^\n\]*" $text "" text
+ regsub -all "(^|\n)\[^\n\]*: in .constexpr. expansion \[^\n\]*" $text ""
text
regsub -all "(^|\n) inlined from \[^\n\]*" $text "" text
# Why doesn't GCC need these to strip header context?
regsub -all "(^|\n)In file included from \[^\n\]*" $text "" text
--
2.41.0