]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
libstdc++: Fix testsuite failures with -O0
authorJonathan Wakely <jwakely@redhat.com>
Wed, 4 Oct 2023 11:07:11 +0000 (12:07 +0100)
committerJonathan Wakely <jwakely@redhat.com>
Wed, 4 Oct 2023 11:23:34 +0000 (12:23 +0100)
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'.

libstdc++-v3/testsuite/20_util/integer_comparisons/greater_equal_neg.cc
libstdc++-v3/testsuite/20_util/integer_comparisons/greater_neg.cc
libstdc++-v3/testsuite/20_util/integer_comparisons/less_equal_neg.cc
libstdc++-v3/testsuite/lib/prune.exp

index 626332629484e0ae2de824aa35e9ac7ebf45cf20..028dce3df51f80e22e4db2164d0bf1d39f3d3423 100644 (file)
@@ -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>
index 48cb64d56763379c15a9300ce03dbb9434366e91..f0422bc19485d3329785e81b51ea3af68a1c210b 100644 (file)
@@ -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>
index a16b36a83c93c2c586b349edf8a77decb3cd8943..3bd5d6480fea13355eb8005d840a8c8b553fe7b1 100644 (file)
@@ -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>
index 6c905631f161c7399dd6dda7c74f42359f1456dd..2ebfb922ef4aacc0e3cb81b5d2010f783e933187 100644 (file)
@@ -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