libstdc++: Fix failing test in debug mode
authorJonathan Wakely <jwakely@redhat.com>
Thu, 27 Feb 2020 17:22:50 +0000 (17:22 +0000)
committerJonathan Wakely <jwakely@redhat.com>
Fri, 28 Feb 2020 12:58:14 +0000 (12:58 +0000)
This fixes a failure due to a (correct) warning seen when testing with
-D_GLIBCXX_USE_CXX11_ABI=0 -D_GLIBCXX_ASSERTIONS:

include/bits/char_traits.h:365: warning: 'void* __builtin_memcpy(void*, const void*, long unsigned int)'
specified bound 18446744073709551615 exceeds maximum object size 9223372036854775807 [-Wstringop-overflow=]

FAIL: 21_strings/basic_string/cons/char/1.cc (test for excess errors)

* testsuite/21_strings/basic_string/cons/char/1.cc: Disable
-Wstringop-overflow warnings.

libstdc++-v3/ChangeLog
libstdc++-v3/testsuite/21_strings/basic_string/cons/char/1.cc

index 26e288d4f4351b959c9e043b479a938e68f41225..24ce2a140dbdb30f598a20e94c152b4d484c2bdd 100644 (file)
@@ -1,3 +1,8 @@
+2020-02-28  Jonathan Wakely  <jwakely@redhat.com>
+
+       * testsuite/21_strings/basic_string/cons/char/1.cc: Disable
+       -Wstringop-overflow warnings.
+
 2020-02-27  Jonathan Wakely  <jwakely@redhat.com>
 
        * testsuite/lib/libstdc++.exp (v3_target_compile): Add
index 660545882737ddf8132c340c0ec8f273980b6714..1c3e43f2fd46da0299f4272416108b0763a29de4 100644 (file)
@@ -19,6 +19,8 @@
 
 // 21.3.1 basic_string constructors.
 
+// { dg-options "-Wno-stringop-overflow" }
+
 #include <new>
 #include <stdexcept>
 #include <testsuite_hooks.h>