public inbox for libstdc++-cvs@sourceware.org
help / color / mirror / Atom feed
From: Aldy Hernandez <aldyh@gcc.gnu.org>
To: gcc-cvs@gcc.gnu.org, libstdc++-cvs@gcc.gnu.org
Subject: [gcc/devel/ranger] libstdc++: Fix failing test in debug mode
Date: Wed, 17 Jun 2020 19:16:53 +0000 (GMT)	[thread overview]
Message-ID: <20200617191653.93A313959C39@sourceware.org> (raw)

https://gcc.gnu.org/g:86e2dc22c91a722d2624c0010d81f1ce4b911bbd

commit 86e2dc22c91a722d2624c0010d81f1ce4b911bbd
Author: Jonathan Wakely <jwakely@redhat.com>
Date:   Thu Feb 27 17:22:50 2020 +0000

    libstdc++: Fix failing test in debug mode
    
    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.

Diff:
---
 libstdc++-v3/ChangeLog                                        | 5 +++++
 libstdc++-v3/testsuite/21_strings/basic_string/cons/char/1.cc | 2 ++
 2 files changed, 7 insertions(+)

diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog
index 26e288d4f43..24ce2a140db 100644
--- a/libstdc++-v3/ChangeLog
+++ b/libstdc++-v3/ChangeLog
@@ -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
diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/cons/char/1.cc b/libstdc++-v3/testsuite/21_strings/basic_string/cons/char/1.cc
index 66054588273..1c3e43f2fd4 100644
--- a/libstdc++-v3/testsuite/21_strings/basic_string/cons/char/1.cc
+++ b/libstdc++-v3/testsuite/21_strings/basic_string/cons/char/1.cc
@@ -19,6 +19,8 @@
 
 // 21.3.1 basic_string constructors.
 
+// { dg-options "-Wno-stringop-overflow" }
+
 #include <new>
 #include <stdexcept>
 #include <testsuite_hooks.h>


                 reply	other threads:[~2020-06-17 19:16 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200617191653.93A313959C39@sourceware.org \
    --to=aldyh@gcc.gnu.org \
    --cc=gcc-cvs@gcc.gnu.org \
    --cc=libstdc++-cvs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).