From c3cdd71f455baea8b0c36968239871ab92292577 Mon Sep 17 00:00:00 2001 From: Jonathan Wakely Date: Wed, 22 Jan 2014 19:46:44 +0000 Subject: [PATCH] =?utf8?q?re=20PR=20libstdc++/58764=20([lwg/2193]=20error:?= =?utf8?q?=20converting=20to=20=E2=80=98const=20std::vector=20>=E2=80=99=20from=20initializer=20list=20would=20u?= =?utf8?q?se=20explicit=20constructor)?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit PR libstdc++/58764 * include/bits/stl_deque.h (deque::deque(const allocator_type&): Split into separate default constructor and constructor taking allocator. * include/bits/stl_list.h (list::list(const allocator_type&): Likewise. * include/bits/stl_vector.h (vector::vector(const allocator_type&): Likewise. * include/debug/deque (deque::deque(const allocator_type&)): Likewise. * include/debug/list (list::list(const _Allocator&)): Likewise. * include/debug/map.h (map::map(const _Compare&, const _Allocator&)): Likewise. * include/debug/multimap.h (multimap::multimap(const _Compare&, const _Allocator&)): Likewise. * include/debug/set.h (set::set(const _Compare&, const _Allocator&)): Likewise. * include/debug/multiset.h (multiset::multiset(const _Compare&, const _Allocator&)): Likewise. * include/debug/vector (vector::vector(const allocator_type&)): Likewise. * include/profile/deque (deque::deque(const _Allocator&)): Likewise. * include/profile/list (list::list(const _Allocator&)): Likewise. * include/profile/map.h (map::map(const _Compare&, const _Allocator&)): Likewise. * include/profile/multimap.h (multimap::multimap(const _Compare&, const _Allocator&)): Likewise. * include/profile/set.h (set::set(const _Compare&, const _Allocator&)): Likewise. * include/profile/multiset.h (multiset::multiset(const _Compare&, const _Allocator&)): Likewise. * include/profile/vector (vector::vector(const _Allocator&)): Likewise. * testsuite/23_containers/deque/58764.cc: New. * testsuite/23_containers/list/58764.cc: New. * testsuite/23_containers/map/58764.cc: New. * testsuite/23_containers/multimap/58764.cc: New. * testsuite/23_containers/set/58764.cc: New. * testsuite/23_containers/multiset/58764.cc: New. * testsuite/23_containers/vector/58764.cc: New. * testsuite/23_containers/deque/requirements/dr438/assign_neg.cc: Adjust dg-error line number. * testsuite/23_containers/deque/requirements/dr438/ constructor_1_neg.cc: Likewise. * testsuite/23_containers/deque/requirements/dr438/ constructor_2_neg.cc: Likewise. * testsuite/23_containers/deque/requirements/dr438/insert_neg.cc: Likewise. * testsuite/23_containers/list/requirements/dr438/assign_neg.cc: Likewise. * testsuite/23_containers/list/requirements/dr438/constructor_1_neg.cc: Likewise. * testsuite/23_containers/list/requirements/dr438/constructor_2_neg.cc: Likewise. * testsuite/23_containers/list/requirements/dr438/insert_neg.cc: Likewise. * testsuite/23_containers/vector/requirements/dr438/assign_neg.cc: Likewise. * testsuite/23_containers/vector/requirements/dr438/ constructor_1_neg.cc: Likewise. * testsuite/23_containers/vector/requirements/dr438/ constructor_2_neg.cc: Likewise. * testsuite/23_containers/vector/requirements/dr438/insert_neg.cc: Likewise. From-SVN: r206939 --- libstdc++-v3/ChangeLog | 63 +++++++++++++++++++ libstdc++-v3/include/bits/stl_deque.h | 8 ++- libstdc++-v3/include/bits/stl_list.h | 9 ++- libstdc++-v3/include/bits/stl_vector.h | 8 ++- libstdc++-v3/include/debug/deque | 5 +- libstdc++-v3/include/debug/list | 6 +- libstdc++-v3/include/debug/map.h | 5 +- libstdc++-v3/include/debug/multimap.h | 5 +- libstdc++-v3/include/debug/multiset.h | 5 +- libstdc++-v3/include/debug/set.h | 5 +- libstdc++-v3/include/debug/vector | 6 +- libstdc++-v3/include/profile/deque | 6 +- libstdc++-v3/include/profile/list | 10 ++- libstdc++-v3/include/profile/map.h | 7 ++- libstdc++-v3/include/profile/multimap.h | 6 +- libstdc++-v3/include/profile/multiset.h | 6 +- libstdc++-v3/include/profile/set.h | 6 +- libstdc++-v3/include/profile/vector | 10 ++- .../testsuite/23_containers/deque/58764.cc | 28 +++++++++ .../deque/requirements/dr438/assign_neg.cc | 2 +- .../requirements/dr438/constructor_1_neg.cc | 2 +- .../requirements/dr438/constructor_2_neg.cc | 2 +- .../deque/requirements/dr438/insert_neg.cc | 2 +- .../testsuite/23_containers/list/58764.cc | 28 +++++++++ .../list/requirements/dr438/assign_neg.cc | 2 +- .../requirements/dr438/constructor_1_neg.cc | 2 +- .../requirements/dr438/constructor_2_neg.cc | 2 +- .../list/requirements/dr438/insert_neg.cc | 2 +- .../testsuite/23_containers/map/58764.cc | 28 +++++++++ .../testsuite/23_containers/multimap/58764.cc | 28 +++++++++ .../testsuite/23_containers/multiset/58764.cc | 28 +++++++++ .../testsuite/23_containers/set/58764.cc | 28 +++++++++ .../testsuite/23_containers/vector/58764.cc | 29 +++++++++ .../vector/requirements/dr438/assign_neg.cc | 2 +- .../requirements/dr438/constructor_1_neg.cc | 2 +- .../requirements/dr438/constructor_2_neg.cc | 2 +- .../vector/requirements/dr438/insert_neg.cc | 2 +- 37 files changed, 368 insertions(+), 29 deletions(-) create mode 100644 libstdc++-v3/testsuite/23_containers/deque/58764.cc create mode 100644 libstdc++-v3/testsuite/23_containers/list/58764.cc create mode 100644 libstdc++-v3/testsuite/23_containers/map/58764.cc create mode 100644 libstdc++-v3/testsuite/23_containers/multimap/58764.cc create mode 100644 libstdc++-v3/testsuite/23_containers/multiset/58764.cc create mode 100644 libstdc++-v3/testsuite/23_containers/set/58764.cc create mode 100644 libstdc++-v3/testsuite/23_containers/vector/58764.cc diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 8810a0aa3e86..7b8e7b644c47 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -2,6 +2,69 @@ * include/bits/stl_deque.h (_Deque_impl): Move comment. + PR libstdc++/58764 + * include/bits/stl_deque.h (deque::deque(const allocator_type&): + Split into separate default constructor and constructor taking + allocator. + * include/bits/stl_list.h (list::list(const allocator_type&): Likewise. + * include/bits/stl_vector.h (vector::vector(const allocator_type&): + Likewise. + * include/debug/deque (deque::deque(const allocator_type&)): Likewise. + * include/debug/list (list::list(const _Allocator&)): Likewise. + * include/debug/map.h (map::map(const _Compare&, const _Allocator&)): + Likewise. + * include/debug/multimap.h + (multimap::multimap(const _Compare&, const _Allocator&)): Likewise. + * include/debug/set.h (set::set(const _Compare&, const _Allocator&)): + Likewise. + * include/debug/multiset.h + (multiset::multiset(const _Compare&, const _Allocator&)): Likewise. + * include/debug/vector (vector::vector(const allocator_type&)): + Likewise. + * include/profile/deque (deque::deque(const _Allocator&)): Likewise. + * include/profile/list (list::list(const _Allocator&)): Likewise. + * include/profile/map.h + (map::map(const _Compare&, const _Allocator&)): Likewise. + * include/profile/multimap.h + (multimap::multimap(const _Compare&, const _Allocator&)): Likewise. + * include/profile/set.h + (set::set(const _Compare&, const _Allocator&)): Likewise. + * include/profile/multiset.h + (multiset::multiset(const _Compare&, const _Allocator&)): Likewise. + * include/profile/vector (vector::vector(const _Allocator&)): + Likewise. + * testsuite/23_containers/deque/58764.cc: New. + * testsuite/23_containers/list/58764.cc: New. + * testsuite/23_containers/map/58764.cc: New. + * testsuite/23_containers/multimap/58764.cc: New. + * testsuite/23_containers/set/58764.cc: New. + * testsuite/23_containers/multiset/58764.cc: New. + * testsuite/23_containers/vector/58764.cc: New. + * testsuite/23_containers/deque/requirements/dr438/assign_neg.cc: + Adjust dg-error line number. + * testsuite/23_containers/deque/requirements/dr438/ + constructor_1_neg.cc: Likewise. + * testsuite/23_containers/deque/requirements/dr438/ + constructor_2_neg.cc: Likewise. + * testsuite/23_containers/deque/requirements/dr438/insert_neg.cc: + Likewise. + * testsuite/23_containers/list/requirements/dr438/assign_neg.cc: + Likewise. + * testsuite/23_containers/list/requirements/dr438/constructor_1_neg.cc: + Likewise. + * testsuite/23_containers/list/requirements/dr438/constructor_2_neg.cc: + Likewise. + * testsuite/23_containers/list/requirements/dr438/insert_neg.cc: + Likewise. + * testsuite/23_containers/vector/requirements/dr438/assign_neg.cc: + Likewise. + * testsuite/23_containers/vector/requirements/dr438/ + constructor_1_neg.cc: Likewise. + * testsuite/23_containers/vector/requirements/dr438/ + constructor_2_neg.cc: Likewise. + * testsuite/23_containers/vector/requirements/dr438/insert_neg.cc: + Likewise. + 2014-01-21 Tim Shen * include/bits/regex.tcc: Remove incorrect `nosubs` handling. diff --git a/libstdc++-v3/include/bits/stl_deque.h b/libstdc++-v3/include/bits/stl_deque.h index 996c10f604a8..0f4d0e9b8a79 100644 --- a/libstdc++-v3/include/bits/stl_deque.h +++ b/libstdc++-v3/include/bits/stl_deque.h @@ -781,12 +781,18 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER public: // [23.2.1.1] construct/copy/destroy // (assign() and get_allocator() are also listed in this section) + + /** + * @brief Creates a %deque with no elements. + */ + deque() : _Base() { } + /** * @brief Creates a %deque with no elements. * @param __a An allocator object. */ explicit - deque(const allocator_type& __a = allocator_type()) + deque(const allocator_type& __a) : _Base(__a) { } #if __cplusplus >= 201103L diff --git a/libstdc++-v3/include/bits/stl_list.h b/libstdc++-v3/include/bits/stl_list.h index b5e6cc8634db..19bb18934e62 100644 --- a/libstdc++-v3/include/bits/stl_list.h +++ b/libstdc++-v3/include/bits/stl_list.h @@ -526,12 +526,19 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER public: // [23.2.2.1] construct/copy/destroy // (assign() and get_allocator() are also listed in this section) + + /** + * @brief Creates a %list with no elements. + */ + list() _GLIBCXX_NOEXCEPT + : _Base() { } + /** * @brief Creates a %list with no elements. * @param __a An allocator object. */ explicit - list(const allocator_type& __a = allocator_type()) _GLIBCXX_NOEXCEPT + list(const allocator_type& __a) _GLIBCXX_NOEXCEPT : _Base(_Node_alloc_type(__a)) { } #if __cplusplus >= 201103L diff --git a/libstdc++-v3/include/bits/stl_vector.h b/libstdc++-v3/include/bits/stl_vector.h index 2cedd39cae8b..14284aad8add 100644 --- a/libstdc++-v3/include/bits/stl_vector.h +++ b/libstdc++-v3/include/bits/stl_vector.h @@ -242,12 +242,18 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER public: // [23.2.4.1] construct/copy/destroy // (assign() and get_allocator() are also listed in this section) + + /** + * @brief Creates a %vector with no elements. + */ + vector() _GLIBCXX_NOEXCEPT : _Base() { } + /** * @brief Creates a %vector with no elements. * @param __a An allocator object. */ explicit - vector(const allocator_type& __a = allocator_type()) _GLIBCXX_NOEXCEPT + vector(const allocator_type& __a) _GLIBCXX_NOEXCEPT : _Base(__a) { } #if __cplusplus >= 201103L diff --git a/libstdc++-v3/include/debug/deque b/libstdc++-v3/include/debug/deque index f16d72ca9e7c..225d06c92d17 100644 --- a/libstdc++-v3/include/debug/deque +++ b/libstdc++-v3/include/debug/deque @@ -68,8 +68,11 @@ namespace __debug typedef std::reverse_iterator const_reverse_iterator; // 23.2.1.1 construct/copy/destroy: + + deque() : _Base() { } + explicit - deque(const _Allocator& __a = _Allocator()) + deque(const _Allocator& __a) : _Base(__a) { } #if __cplusplus >= 201103L diff --git a/libstdc++-v3/include/debug/list b/libstdc++-v3/include/debug/list index 145f59d735db..9918bc5d8088 100644 --- a/libstdc++-v3/include/debug/list +++ b/libstdc++-v3/include/debug/list @@ -69,8 +69,12 @@ namespace __debug typedef std::reverse_iterator const_reverse_iterator; // 23.2.2.1 construct/copy/destroy: + + list() _GLIBCXX_NOEXCEPT + : _Base() { } + explicit - list(const _Allocator& __a = _Allocator()) _GLIBCXX_NOEXCEPT + list(const _Allocator& __a) _GLIBCXX_NOEXCEPT : _Base(__a) { } #if __cplusplus >= 201103L diff --git a/libstdc++-v3/include/debug/map.h b/libstdc++-v3/include/debug/map.h index 2367d57452c7..bd68c996d0d2 100644 --- a/libstdc++-v3/include/debug/map.h +++ b/libstdc++-v3/include/debug/map.h @@ -77,7 +77,10 @@ namespace __debug typedef std::reverse_iterator const_reverse_iterator; // 23.3.1.1 construct/copy/destroy: - explicit map(const _Compare& __comp = _Compare(), + + map() : _Base() { } + + explicit map(const _Compare& __comp, const _Allocator& __a = _Allocator()) : _Base(__comp, __a) { } diff --git a/libstdc++-v3/include/debug/multimap.h b/libstdc++-v3/include/debug/multimap.h index 0976573b7e1f..fad80cc8ebe1 100644 --- a/libstdc++-v3/include/debug/multimap.h +++ b/libstdc++-v3/include/debug/multimap.h @@ -78,7 +78,10 @@ namespace __debug typedef std::reverse_iterator const_reverse_iterator; // 23.3.1.1 construct/copy/destroy: - explicit multimap(const _Compare& __comp = _Compare(), + + multimap() : _Base() { } + + explicit multimap(const _Compare& __comp, const _Allocator& __a = _Allocator()) : _Base(__comp, __a) { } diff --git a/libstdc++-v3/include/debug/multiset.h b/libstdc++-v3/include/debug/multiset.h index 5a39ef8887f2..bd555b3c2906 100644 --- a/libstdc++-v3/include/debug/multiset.h +++ b/libstdc++-v3/include/debug/multiset.h @@ -77,7 +77,10 @@ namespace __debug typedef std::reverse_iterator const_reverse_iterator; // 23.3.3.1 construct/copy/destroy: - explicit multiset(const _Compare& __comp = _Compare(), + + multiset() : _Base() { } + + explicit multiset(const _Compare& __comp, const _Allocator& __a = _Allocator()) : _Base(__comp, __a) { } diff --git a/libstdc++-v3/include/debug/set.h b/libstdc++-v3/include/debug/set.h index 8c84f25298a9..f40ecec818f7 100644 --- a/libstdc++-v3/include/debug/set.h +++ b/libstdc++-v3/include/debug/set.h @@ -76,7 +76,10 @@ namespace __debug typedef std::reverse_iterator const_reverse_iterator; // 23.3.3.1 construct/copy/destroy: - explicit set(const _Compare& __comp = _Compare(), + + set() : _Base() { } + + explicit set(const _Compare& __comp, const _Allocator& __a = _Allocator()) : _Base(__comp, __a) { } diff --git a/libstdc++-v3/include/debug/vector b/libstdc++-v3/include/debug/vector index 2b750d792a3a..58d98ef5de51 100644 --- a/libstdc++-v3/include/debug/vector +++ b/libstdc++-v3/include/debug/vector @@ -76,8 +76,12 @@ namespace __debug typedef std::reverse_iterator const_reverse_iterator; // 23.2.4.1 construct/copy/destroy: + + vector() _GLIBCXX_NOEXCEPT + : _Base(), _M_guaranteed_capacity(0) { } + explicit - vector(const _Allocator& __a = _Allocator()) _GLIBCXX_NOEXCEPT + vector(const _Allocator& __a) _GLIBCXX_NOEXCEPT : _Base(__a), _M_guaranteed_capacity(0) { } #if __cplusplus >= 201103L diff --git a/libstdc++-v3/include/profile/deque b/libstdc++-v3/include/profile/deque index d6aa6bd59464..2c4f9cbd0199 100644 --- a/libstdc++-v3/include/profile/deque +++ b/libstdc++-v3/include/profile/deque @@ -60,8 +60,12 @@ namespace __profile typedef typename _Base::const_pointer const_pointer; // 23.2.1.1 construct/copy/destroy: + + deque() + : _Base() { } + explicit - deque(const _Allocator& __a = _Allocator()) + deque(const _Allocator& __a) : _Base(__a) { } #if __cplusplus >= 201103L diff --git a/libstdc++-v3/include/profile/list b/libstdc++-v3/include/profile/list index c89332003a74..87d99a0b93d8 100644 --- a/libstdc++-v3/include/profile/list +++ b/libstdc++-v3/include/profile/list @@ -64,8 +64,16 @@ template > typedef std::reverse_iterator const_reverse_iterator; // 23.2.2.1 construct/copy/destroy: + + list() _GLIBCXX_NOEXCEPT + : _Base() + { + __profcxx_list_construct(this); // list2slist + __profcxx_list_construct2(this); // list2vector + } + explicit - list(const _Allocator& __a = _Allocator()) _GLIBCXX_NOEXCEPT + list(const _Allocator& __a) _GLIBCXX_NOEXCEPT : _Base(__a) { __profcxx_list_construct(this); // list2slist diff --git a/libstdc++-v3/include/profile/map.h b/libstdc++-v3/include/profile/map.h index 63fb0cbb2273..6a3160b8e6be 100644 --- a/libstdc++-v3/include/profile/map.h +++ b/libstdc++-v3/include/profile/map.h @@ -67,8 +67,13 @@ namespace __profile typedef std::reverse_iterator const_reverse_iterator; // 23.3.1.1 construct/copy/destroy: + + map() + : _Base() + { __profcxx_map_to_unordered_map_construct(this); } + explicit - map(const _Compare& __comp = _Compare(), + map(const _Compare& __comp, const _Allocator& __a = _Allocator()) : _Base(__comp, __a) { __profcxx_map_to_unordered_map_construct(this); } diff --git a/libstdc++-v3/include/profile/multimap.h b/libstdc++-v3/include/profile/multimap.h index 4a703ce36365..5ba5355ec553 100644 --- a/libstdc++-v3/include/profile/multimap.h +++ b/libstdc++-v3/include/profile/multimap.h @@ -68,7 +68,11 @@ namespace __profile typedef typename _Base::const_pointer const_pointer; // 23.3.1.1 construct/copy/destroy: - explicit multimap(const _Compare& __comp = _Compare(), + + multimap() + : _Base() { } + + explicit multimap(const _Compare& __comp, const _Allocator& __a = _Allocator()) : _Base(__comp, __a) { } diff --git a/libstdc++-v3/include/profile/multiset.h b/libstdc++-v3/include/profile/multiset.h index 1719728a26f8..8ef6e6b0de72 100644 --- a/libstdc++-v3/include/profile/multiset.h +++ b/libstdc++-v3/include/profile/multiset.h @@ -68,7 +68,11 @@ namespace __profile typedef typename _Base::const_pointer const_pointer; // 23.3.3.1 construct/copy/destroy: - explicit multiset(const _Compare& __comp = _Compare(), + + multiset() + : _Base() { } + + explicit multiset(const _Compare& __comp, const _Allocator& __a = _Allocator()) : _Base(__comp, __a) { } diff --git a/libstdc++-v3/include/profile/set.h b/libstdc++-v3/include/profile/set.h index 3b8fd55d444b..05fbeb9f6b1d 100644 --- a/libstdc++-v3/include/profile/set.h +++ b/libstdc++-v3/include/profile/set.h @@ -68,7 +68,11 @@ namespace __profile typedef typename _Base::const_pointer const_pointer; // 23.3.3.1 construct/copy/destroy: - explicit set(const _Compare& __comp = _Compare(), + + set() + : _Base() { } + + explicit set(const _Compare& __comp, const _Allocator& __a = _Allocator()) : _Base(__comp, __a) { } diff --git a/libstdc++-v3/include/profile/vector b/libstdc++-v3/include/profile/vector index a286ac59b9fb..5c2c6219029e 100644 --- a/libstdc++-v3/include/profile/vector +++ b/libstdc++-v3/include/profile/vector @@ -77,8 +77,16 @@ namespace __profile _M_base() const _GLIBCXX_NOEXCEPT { return *this; } // 23.2.4.1 construct/copy/destroy: + + vector() _GLIBCXX_NOEXCEPT + : _Base() + { + __profcxx_vector_construct(this, this->capacity()); + __profcxx_vector_construct2(this); + } + explicit - vector(const _Allocator& __a = _Allocator()) _GLIBCXX_NOEXCEPT + vector(const _Allocator& __a) _GLIBCXX_NOEXCEPT : _Base(__a) { __profcxx_vector_construct(this, this->capacity()); diff --git a/libstdc++-v3/testsuite/23_containers/deque/58764.cc b/libstdc++-v3/testsuite/23_containers/deque/58764.cc new file mode 100644 index 000000000000..a1056aa710d4 --- /dev/null +++ b/libstdc++-v3/testsuite/23_containers/deque/58764.cc @@ -0,0 +1,28 @@ +// Copyright (C) 2014 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 3, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING3. If not see +// . + +// { dg-do compile } +// { dg-options "-std=gnu++11" } + +// libstdc++/58764 + +#include + +void test01() +{ + std::deque a = {}; +} diff --git a/libstdc++-v3/testsuite/23_containers/deque/requirements/dr438/assign_neg.cc b/libstdc++-v3/testsuite/23_containers/deque/requirements/dr438/assign_neg.cc index b4d2c80dbbed..4de8f2d0fb9d 100644 --- a/libstdc++-v3/testsuite/23_containers/deque/requirements/dr438/assign_neg.cc +++ b/libstdc++-v3/testsuite/23_containers/deque/requirements/dr438/assign_neg.cc @@ -18,7 +18,7 @@ // . // { dg-do compile } -// { dg-error "no matching" "" { target *-*-* } 1758 } +// { dg-error "no matching" "" { target *-*-* } 1764 } #include diff --git a/libstdc++-v3/testsuite/23_containers/deque/requirements/dr438/constructor_1_neg.cc b/libstdc++-v3/testsuite/23_containers/deque/requirements/dr438/constructor_1_neg.cc index bfa6692ade4c..41f29056198c 100644 --- a/libstdc++-v3/testsuite/23_containers/deque/requirements/dr438/constructor_1_neg.cc +++ b/libstdc++-v3/testsuite/23_containers/deque/requirements/dr438/constructor_1_neg.cc @@ -18,7 +18,7 @@ // . // { dg-do compile } -// { dg-error "no matching" "" { target *-*-* } 1691 } +// { dg-error "no matching" "" { target *-*-* } 1697 } #include diff --git a/libstdc++-v3/testsuite/23_containers/deque/requirements/dr438/constructor_2_neg.cc b/libstdc++-v3/testsuite/23_containers/deque/requirements/dr438/constructor_2_neg.cc index 9a054379c7cc..f77b1267890f 100644 --- a/libstdc++-v3/testsuite/23_containers/deque/requirements/dr438/constructor_2_neg.cc +++ b/libstdc++-v3/testsuite/23_containers/deque/requirements/dr438/constructor_2_neg.cc @@ -18,7 +18,7 @@ // . // { dg-do compile } -// { dg-error "no matching" "" { target *-*-* } 1691 } +// { dg-error "no matching" "" { target *-*-* } 1697 } #include #include diff --git a/libstdc++-v3/testsuite/23_containers/deque/requirements/dr438/insert_neg.cc b/libstdc++-v3/testsuite/23_containers/deque/requirements/dr438/insert_neg.cc index d2bb0fb2019b..e7d5b1ee654b 100644 --- a/libstdc++-v3/testsuite/23_containers/deque/requirements/dr438/insert_neg.cc +++ b/libstdc++-v3/testsuite/23_containers/deque/requirements/dr438/insert_neg.cc @@ -18,7 +18,7 @@ // . // { dg-do compile } -// { dg-error "no matching" "" { target *-*-* } 1842 } +// { dg-error "no matching" "" { target *-*-* } 1848 } #include diff --git a/libstdc++-v3/testsuite/23_containers/list/58764.cc b/libstdc++-v3/testsuite/23_containers/list/58764.cc new file mode 100644 index 000000000000..c523e0276ad4 --- /dev/null +++ b/libstdc++-v3/testsuite/23_containers/list/58764.cc @@ -0,0 +1,28 @@ +// Copyright (C) 2014 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 3, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING3. If not see +// . + +// { dg-do compile } +// { dg-options "-std=gnu++11" } + +// libstdc++/58764 + +#include + +void test01() +{ + std::list a = {}; +} diff --git a/libstdc++-v3/testsuite/23_containers/list/requirements/dr438/assign_neg.cc b/libstdc++-v3/testsuite/23_containers/list/requirements/dr438/assign_neg.cc index 6dbf14303bf9..fed782919366 100644 --- a/libstdc++-v3/testsuite/23_containers/list/requirements/dr438/assign_neg.cc +++ b/libstdc++-v3/testsuite/23_containers/list/requirements/dr438/assign_neg.cc @@ -18,7 +18,7 @@ // . // { dg-do compile } -// { dg-error "no matching" "" { target *-*-* } 1646 } +// { dg-error "no matching" "" { target *-*-* } 1653 } #include diff --git a/libstdc++-v3/testsuite/23_containers/list/requirements/dr438/constructor_1_neg.cc b/libstdc++-v3/testsuite/23_containers/list/requirements/dr438/constructor_1_neg.cc index 915ecf435f48..f5eae4fec95c 100644 --- a/libstdc++-v3/testsuite/23_containers/list/requirements/dr438/constructor_1_neg.cc +++ b/libstdc++-v3/testsuite/23_containers/list/requirements/dr438/constructor_1_neg.cc @@ -18,7 +18,7 @@ // . // { dg-do compile } -// { dg-error "no matching" "" { target *-*-* } 1598 } +// { dg-error "no matching" "" { target *-*-* } 1605 } #include diff --git a/libstdc++-v3/testsuite/23_containers/list/requirements/dr438/constructor_2_neg.cc b/libstdc++-v3/testsuite/23_containers/list/requirements/dr438/constructor_2_neg.cc index 5c94805ecea5..e0fbe975377a 100644 --- a/libstdc++-v3/testsuite/23_containers/list/requirements/dr438/constructor_2_neg.cc +++ b/libstdc++-v3/testsuite/23_containers/list/requirements/dr438/constructor_2_neg.cc @@ -18,7 +18,7 @@ // . // { dg-do compile } -// { dg-error "no matching" "" { target *-*-* } 1598 } +// { dg-error "no matching" "" { target *-*-* } 1605 } #include #include diff --git a/libstdc++-v3/testsuite/23_containers/list/requirements/dr438/insert_neg.cc b/libstdc++-v3/testsuite/23_containers/list/requirements/dr438/insert_neg.cc index 30ea0c478caa..3904624a07e4 100644 --- a/libstdc++-v3/testsuite/23_containers/list/requirements/dr438/insert_neg.cc +++ b/libstdc++-v3/testsuite/23_containers/list/requirements/dr438/insert_neg.cc @@ -18,7 +18,7 @@ // . // { dg-do compile } -// { dg-error "no matching" "" { target *-*-* } 1598 } +// { dg-error "no matching" "" { target *-*-* } 1605 } #include diff --git a/libstdc++-v3/testsuite/23_containers/map/58764.cc b/libstdc++-v3/testsuite/23_containers/map/58764.cc new file mode 100644 index 000000000000..31e09665bc63 --- /dev/null +++ b/libstdc++-v3/testsuite/23_containers/map/58764.cc @@ -0,0 +1,28 @@ +// Copyright (C) 2014 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 3, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING3. If not see +// . + +// { dg-do compile } +// { dg-options "-std=gnu++11" } + +// libstdc++/58764 + +#include + +void test01() +{ + std::map a = {}; +} diff --git a/libstdc++-v3/testsuite/23_containers/multimap/58764.cc b/libstdc++-v3/testsuite/23_containers/multimap/58764.cc new file mode 100644 index 000000000000..4e85116727be --- /dev/null +++ b/libstdc++-v3/testsuite/23_containers/multimap/58764.cc @@ -0,0 +1,28 @@ +// Copyright (C) 2014 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 3, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING3. If not see +// . + +// { dg-do compile } +// { dg-options "-std=gnu++11" } + +// libstdc++/58764 + +#include + +void test01() +{ + std::multimap a = {}; +} diff --git a/libstdc++-v3/testsuite/23_containers/multiset/58764.cc b/libstdc++-v3/testsuite/23_containers/multiset/58764.cc new file mode 100644 index 000000000000..f827923012e2 --- /dev/null +++ b/libstdc++-v3/testsuite/23_containers/multiset/58764.cc @@ -0,0 +1,28 @@ +// Copyright (C) 2014 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 3, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING3. If not see +// . + +// { dg-do compile } +// { dg-options "-std=gnu++11" } + +// libstdc++/58764 + +#include + +void test01() +{ + std::multiset a = {}; +} diff --git a/libstdc++-v3/testsuite/23_containers/set/58764.cc b/libstdc++-v3/testsuite/23_containers/set/58764.cc new file mode 100644 index 000000000000..9a2ae3ac79ac --- /dev/null +++ b/libstdc++-v3/testsuite/23_containers/set/58764.cc @@ -0,0 +1,28 @@ +// Copyright (C) 2014 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 3, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING3. If not see +// . + +// { dg-do compile } +// { dg-options "-std=gnu++11" } + +// libstdc++/58764 + +#include + +void test01() +{ + std::set a = {}; +} diff --git a/libstdc++-v3/testsuite/23_containers/vector/58764.cc b/libstdc++-v3/testsuite/23_containers/vector/58764.cc new file mode 100644 index 000000000000..6a9823c710af --- /dev/null +++ b/libstdc++-v3/testsuite/23_containers/vector/58764.cc @@ -0,0 +1,29 @@ +// Copyright (C) 2014 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 3, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING3. If not see +// . + +// { dg-do compile } +// { dg-options "-std=gnu++11" } + +// libstdc++/58764 + +#include + +void test01() +{ + std::vector a = {}; + std::vector b = {}; +} diff --git a/libstdc++-v3/testsuite/23_containers/vector/requirements/dr438/assign_neg.cc b/libstdc++-v3/testsuite/23_containers/vector/requirements/dr438/assign_neg.cc index 158a9023476e..cfbe73436010 100644 --- a/libstdc++-v3/testsuite/23_containers/vector/requirements/dr438/assign_neg.cc +++ b/libstdc++-v3/testsuite/23_containers/vector/requirements/dr438/assign_neg.cc @@ -18,7 +18,7 @@ // . // { dg-do compile } -// { dg-error "no matching" "" { target *-*-* } 1306 } +// { dg-error "no matching" "" { target *-*-* } 1312 } #include diff --git a/libstdc++-v3/testsuite/23_containers/vector/requirements/dr438/constructor_1_neg.cc b/libstdc++-v3/testsuite/23_containers/vector/requirements/dr438/constructor_1_neg.cc index cf186ebf9b92..88b6e0e2d592 100644 --- a/libstdc++-v3/testsuite/23_containers/vector/requirements/dr438/constructor_1_neg.cc +++ b/libstdc++-v3/testsuite/23_containers/vector/requirements/dr438/constructor_1_neg.cc @@ -18,7 +18,7 @@ // . // { dg-do compile } -// { dg-error "no matching" "" { target *-*-* } 1232 } +// { dg-error "no matching" "" { target *-*-* } 1238 } #include diff --git a/libstdc++-v3/testsuite/23_containers/vector/requirements/dr438/constructor_2_neg.cc b/libstdc++-v3/testsuite/23_containers/vector/requirements/dr438/constructor_2_neg.cc index cbbc1d339304..94cc4ba52115 100644 --- a/libstdc++-v3/testsuite/23_containers/vector/requirements/dr438/constructor_2_neg.cc +++ b/libstdc++-v3/testsuite/23_containers/vector/requirements/dr438/constructor_2_neg.cc @@ -18,7 +18,7 @@ // . // { dg-do compile } -// { dg-error "no matching" "" { target *-*-* } 1232 } +// { dg-error "no matching" "" { target *-*-* } 1238 } #include #include diff --git a/libstdc++-v3/testsuite/23_containers/vector/requirements/dr438/insert_neg.cc b/libstdc++-v3/testsuite/23_containers/vector/requirements/dr438/insert_neg.cc index 8471a647ffd6..de61175bcfed 100644 --- a/libstdc++-v3/testsuite/23_containers/vector/requirements/dr438/insert_neg.cc +++ b/libstdc++-v3/testsuite/23_containers/vector/requirements/dr438/insert_neg.cc @@ -18,7 +18,7 @@ // . // { dg-do compile } -// { dg-error "no matching" "" { target *-*-* } 1347 } +// { dg-error "no matching" "" { target *-*-* } 1353 } #include -- 2.39.5