From 92bab15297a57121317df803c9c688955af30722 Mon Sep 17 00:00:00 2001 From: Jonathan Wakely Date: Fri, 19 Oct 2018 22:50:03 +0100 Subject: [PATCH] Fix testsuite failures due to extra errors in strict dialects When __STRICT_ANSI__ is defined the incorrect allocators used in these tests also trigger and additional static assertion. Prune those extra errors so that the tests don't fail when built with strict dialects. * testsuite/23_containers/deque/48101_neg.cc: Prune additional errors printed when __STRICT_ANSI__ is defined. * testsuite/23_containers/forward_list/48101_neg.cc: Likewise. * testsuite/23_containers/list/48101_neg.cc: Likewise. * testsuite/23_containers/multiset/48101_neg.cc: Likewise. * testsuite/23_containers/set/48101_neg.cc: Likewise. * testsuite/23_containers/unordered_multiset/48101_neg.cc: Likewise. * testsuite/23_containers/unordered_set/48101_neg.cc: Likewise. * testsuite/23_containers/vector/48101_neg.cc: Likewise. From-SVN: r265333 --- libstdc++-v3/ChangeLog | 10 ++++++++++ .../testsuite/23_containers/deque/48101_neg.cc | 1 + .../testsuite/23_containers/forward_list/48101_neg.cc | 1 + libstdc++-v3/testsuite/23_containers/list/48101_neg.cc | 1 + .../testsuite/23_containers/multiset/48101_neg.cc | 1 + libstdc++-v3/testsuite/23_containers/set/48101_neg.cc | 1 + .../23_containers/unordered_multiset/48101_neg.cc | 1 + .../testsuite/23_containers/unordered_set/48101_neg.cc | 1 + .../testsuite/23_containers/vector/48101_neg.cc | 1 + 9 files changed, 18 insertions(+) diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index b3688f89a56..e0265c51a4a 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,5 +1,15 @@ 2018-10-19 Jonathan Wakely + * testsuite/23_containers/deque/48101_neg.cc: Prune additional errors + printed when __STRICT_ANSI__ is defined. + * testsuite/23_containers/forward_list/48101_neg.cc: Likewise. + * testsuite/23_containers/list/48101_neg.cc: Likewise. + * testsuite/23_containers/multiset/48101_neg.cc: Likewise. + * testsuite/23_containers/set/48101_neg.cc: Likewise. + * testsuite/23_containers/unordered_multiset/48101_neg.cc: Likewise. + * testsuite/23_containers/unordered_set/48101_neg.cc: Likewise. + * testsuite/23_containers/vector/48101_neg.cc: Likewise. + * testsuite/23_containers/forward_list/requirements/ explicit_instantiation/5.cc [__STRICT_ANSI__]: Don't test non-standard extension. diff --git a/libstdc++-v3/testsuite/23_containers/deque/48101_neg.cc b/libstdc++-v3/testsuite/23_containers/deque/48101_neg.cc index cee0c9fde47..1f9e3e3b932 100644 --- a/libstdc++-v3/testsuite/23_containers/deque/48101_neg.cc +++ b/libstdc++-v3/testsuite/23_containers/deque/48101_neg.cc @@ -27,3 +27,4 @@ test01() // { dg-error "non-const, non-volatile value_type" "" { target *-*-* } 0 } // { dg-prune-output "std::allocator<.* has no member named " } +// { dg-prune-output "must have the same value_type as its allocator" } diff --git a/libstdc++-v3/testsuite/23_containers/forward_list/48101_neg.cc b/libstdc++-v3/testsuite/23_containers/forward_list/48101_neg.cc index fea18df8d42..46163d17a95 100644 --- a/libstdc++-v3/testsuite/23_containers/forward_list/48101_neg.cc +++ b/libstdc++-v3/testsuite/23_containers/forward_list/48101_neg.cc @@ -27,3 +27,4 @@ test01() // { dg-error "non-const, non-volatile value_type" "" { target *-*-* } 0 } // { dg-prune-output "std::allocator<.* has no member named " } +// { dg-prune-output "must have the same value_type as its allocator" } diff --git a/libstdc++-v3/testsuite/23_containers/list/48101_neg.cc b/libstdc++-v3/testsuite/23_containers/list/48101_neg.cc index 478903a92c5..45848e50809 100644 --- a/libstdc++-v3/testsuite/23_containers/list/48101_neg.cc +++ b/libstdc++-v3/testsuite/23_containers/list/48101_neg.cc @@ -27,3 +27,4 @@ test01() // { dg-error "non-const, non-volatile value_type" "" { target *-*-* } 0 } // { dg-prune-output "std::allocator<.* has no member named " } +// { dg-prune-output "must have the same value_type as its allocator" } diff --git a/libstdc++-v3/testsuite/23_containers/multiset/48101_neg.cc b/libstdc++-v3/testsuite/23_containers/multiset/48101_neg.cc index b815f86219b..3b607f985ad 100644 --- a/libstdc++-v3/testsuite/23_containers/multiset/48101_neg.cc +++ b/libstdc++-v3/testsuite/23_containers/multiset/48101_neg.cc @@ -29,3 +29,4 @@ test01() // { dg-error "non-const, non-volatile value_type" "" { target *-*-* } 0 } // { dg-error "comparison object must be invocable" "" { target *-*-* } 0 } // { dg-prune-output "std::allocator<.* has no member named " } +// { dg-prune-output "must have the same value_type as its allocator" } diff --git a/libstdc++-v3/testsuite/23_containers/set/48101_neg.cc b/libstdc++-v3/testsuite/23_containers/set/48101_neg.cc index 9cd728d9bc6..bf0f4210594 100644 --- a/libstdc++-v3/testsuite/23_containers/set/48101_neg.cc +++ b/libstdc++-v3/testsuite/23_containers/set/48101_neg.cc @@ -29,3 +29,4 @@ test01() // { dg-error "non-const, non-volatile value_type" "" { target *-*-* } 0 } // { dg-error "comparison object must be invocable" "" { target *-*-* } 0 } // { dg-prune-output "std::allocator<.* has no member named " } +// { dg-prune-output "must have the same value_type as its allocator" } diff --git a/libstdc++-v3/testsuite/23_containers/unordered_multiset/48101_neg.cc b/libstdc++-v3/testsuite/23_containers/unordered_multiset/48101_neg.cc index a06c302ad6b..fb239501711 100644 --- a/libstdc++-v3/testsuite/23_containers/unordered_multiset/48101_neg.cc +++ b/libstdc++-v3/testsuite/23_containers/unordered_multiset/48101_neg.cc @@ -31,3 +31,4 @@ test01() // { dg-error "hash function must be invocable" "" { target *-*-* } 0 } // { dg-error "key equality predicate must be invocable" "" { target *-*-* } 0 } // { dg-prune-output "use of deleted function" } +// { dg-prune-output "must have the same value_type as its allocator" } diff --git a/libstdc++-v3/testsuite/23_containers/unordered_set/48101_neg.cc b/libstdc++-v3/testsuite/23_containers/unordered_set/48101_neg.cc index 61f79f917e0..53113788206 100644 --- a/libstdc++-v3/testsuite/23_containers/unordered_set/48101_neg.cc +++ b/libstdc++-v3/testsuite/23_containers/unordered_set/48101_neg.cc @@ -31,3 +31,4 @@ test01() // { dg-error "hash function must be invocable" "" { target *-*-* } 0 } // { dg-error "key equality predicate must be invocable" "" { target *-*-* } 0 } // { dg-prune-output "use of deleted function" } +// { dg-prune-output "must have the same value_type as its allocator" } diff --git a/libstdc++-v3/testsuite/23_containers/vector/48101_neg.cc b/libstdc++-v3/testsuite/23_containers/vector/48101_neg.cc index 95613c53534..620170d0a15 100644 --- a/libstdc++-v3/testsuite/23_containers/vector/48101_neg.cc +++ b/libstdc++-v3/testsuite/23_containers/vector/48101_neg.cc @@ -27,3 +27,4 @@ test01() // { dg-error "non-const, non-volatile value_type" "" { target *-*-* } 0 } // { dg-prune-output "std::allocator<.* has no member named " } +// { dg-prune-output "must have the same value_type as its allocator" } -- 2.30.2