From: "François Dumont" <frs.dumont@gmail.com>
To: "libstdc++@gcc.gnu.org" <libstdc++@gcc.gnu.org>,
gcc-patches <gcc-patches@gcc.gnu.org>
Subject: [PATCH] Fix _GLIBCXX_DEBUG tests
Date: Sun, 13 Dec 2020 15:52:13 +0100 [thread overview]
Message-ID: <5cad3347-a5eb-9cdf-75ec-2e258665efe2@gmail.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 1002 bytes --]
Some tests are XPASS because array assertions have been disabled for a
good reason in C++11.
I wonder if the respective non-constexpr _GLIBCXX_ASSERTION checks
shouldn't target C++14 too. At the moment they are failing as expected
but because of an Undefined Behavior no ?
The other test is failing because of some cleanup in headers which makes
<memory> include necessary.
libstdc++: Fix several _GLIBCXX_DEBUG tests
libstdc++-v3/ChangeLog:
* testsuite/23_containers/array/debug/back2_neg.cc: target
c++14 because assertion
for constexpr is disabled in C++11.
* testsuite/23_containers/array/debug/front2_neg.cc: Likewise.
*
testsuite/23_containers/array/debug/square_brackets_operator2_neg.cc:
Likewise.
*
testsuite/23_containers/vector/debug/multithreaded_swap.cc: Include <memory>
for shared_ptr.
Ok to commit ?
François
[-- Attachment #2: debug.patch --]
[-- Type: text/x-patch, Size: 2217 bytes --]
diff --git a/libstdc++-v3/testsuite/23_containers/array/debug/back2_neg.cc b/libstdc++-v3/testsuite/23_containers/array/debug/back2_neg.cc
index b14a3ec8c04..0066c671c42 100644
--- a/libstdc++-v3/testsuite/23_containers/array/debug/back2_neg.cc
+++ b/libstdc++-v3/testsuite/23_containers/array/debug/back2_neg.cc
@@ -16,7 +16,7 @@
// <http://www.gnu.org/licenses/>.
//
// { dg-options "-D_GLIBCXX_ASSERTIONS" }
-// { dg-do run { target c++11 xfail *-*-* } }
+// { dg-do run { target c++14 xfail *-*-* } }
#include <array>
diff --git a/libstdc++-v3/testsuite/23_containers/array/debug/front2_neg.cc b/libstdc++-v3/testsuite/23_containers/array/debug/front2_neg.cc
index e099e6eb46b..a6118cfce3a 100644
--- a/libstdc++-v3/testsuite/23_containers/array/debug/front2_neg.cc
+++ b/libstdc++-v3/testsuite/23_containers/array/debug/front2_neg.cc
@@ -16,7 +16,7 @@
// <http://www.gnu.org/licenses/>.
//
// { dg-options "-D_GLIBCXX_ASSERTIONS" }
-// { dg-do run { target c++11 xfail *-*-* } }
+// { dg-do run { target c++14 xfail *-*-* } }
#include <array>
diff --git a/libstdc++-v3/testsuite/23_containers/array/debug/square_brackets_operator2_neg.cc b/libstdc++-v3/testsuite/23_containers/array/debug/square_brackets_operator2_neg.cc
index 4e93c8a7d68..efb28d715e9 100644
--- a/libstdc++-v3/testsuite/23_containers/array/debug/square_brackets_operator2_neg.cc
+++ b/libstdc++-v3/testsuite/23_containers/array/debug/square_brackets_operator2_neg.cc
@@ -16,7 +16,7 @@
// <http://www.gnu.org/licenses/>.
//
// { dg-options "-D_GLIBCXX_ASSERTIONS" }
-// { dg-do run { target c++11 xfail *-*-* } }
+// { dg-do run { target c++14 xfail *-*-* } }
#include <array>
diff --git a/libstdc++-v3/testsuite/23_containers/vector/debug/multithreaded_swap.cc b/libstdc++-v3/testsuite/23_containers/vector/debug/multithreaded_swap.cc
index 0d795147644..a0050ec764c 100644
--- a/libstdc++-v3/testsuite/23_containers/vector/debug/multithreaded_swap.cc
+++ b/libstdc++-v3/testsuite/23_containers/vector/debug/multithreaded_swap.cc
@@ -26,6 +26,7 @@
// mode as it requires acquiring 2 locks at the same time.
#include <vector>
+#include <memory>
#include <thread>
#include <functional>
#include <testsuite_hooks.h>
next reply other threads:[~2020-12-13 14:52 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-13 14:52 François Dumont [this message]
2020-12-13 22:17 ` Jonathan Wakely
2020-12-14 6:50 ` François Dumont
2020-12-14 10:08 ` Jonathan Wakely
2020-12-14 21:36 ` François Dumont
2020-12-15 15:20 ` Jonathan Wakely
2020-12-15 15:41 ` Jonathan Wakely
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=5cad3347-a5eb-9cdf-75ec-2e258665efe2@gmail.com \
--to=frs.dumont@gmail.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=libstdc++@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).