diff options
author | Benjamin Kosnik <bkoz@redhat.com> | 2013-06-10 23:11:05 +0000 |
---|---|---|
committer | Benjamin Kosnik <bkoz@gcc.gnu.org> | 2013-06-10 23:11:05 +0000 |
commit | 3b31a7273829b9b36bbe542952f7a23e68860055 (patch) | |
tree | 6e23bd35a1443585f8f865dfbba9b0e48f3b6f73 /libstdc++-v3/testsuite/23_containers/multiset | |
parent | 19be72ab30d4518ebabbed3c3aefb020d00e374d (diff) | |
download | gcc-3b31a7273829b9b36bbe542952f7a23e68860055.tar.gz |
c++config (_GLIBCXX_ABI_TAG_CXX11): Add.
2013-06-10 Benjamin Kosnik <bkoz@redhat.com>
* include/bits/c++config (_GLIBCXX_ABI_TAG_CXX11): Add.
* include/bits/stl_map.h (erase): Use abi_tag when C++11.
* include/bits/stl_multimap.h: Same.
* include/bits/stl_multiset.h: Same.
* include/bits/stl_set.h: Same.
* include/bits/stl_tree.h: Same.
* include/std/complex (real, imag): Use macro for abi_tag.
* testsuite/lib/libstdc++.exp: Disable inlinling with -fno-inline.
* testsuite/util/testsuite_containers.h (erase_external): New
declarations.
(erase_external_iterators): Same.
(linkage_check_cxx98_cxx11_erase): Same.
(linkage_check_cxx98_cxx11_erase_iterators): Same.
* testsuite/util/testsuite_shared.cc: Define.
* testsuite/23_containers/map/modifiers/erase/abi_tag.cc: New.
* testsuite/23_containers/map/modifiers/erase/
dr130-linkage-check.cc: New.
* testsuite/23_containers/multimap/modifiers/erase/abi_tag.cc: New.
* testsuite/23_containers/multimap/modifiers/erase/
dr130-linkage-check.cc: New.
* testsuite/23_containers/multiset/modifiers/erase/abi_tag.cc: New.
* testsuite/23_containers/multiset/modifiers/erase/
dr130-linkage-check.cc: New.
* testsuite/23_containers/set/modifiers/erase/abi_tag.cc: New.
* testsuite/23_containers/set/modifiers/erase/dr130-linkage-check.cc:
New.
* testsuite/ext/profile/mutex_extensions_neg.cc: Adjust line number.
* testsuite/23_containers/map/dr130.cc: Move...
* testsuite/23_containers/map/modifiers/dr130.cc: ...here.
* testsuite/23_containers/multimap/dr130.cc: Move ...
* testsuite/23_containers/multimap/modifiers/dr130.cc: ...here.
* testsuite/23_containers/multiset/dr130.cc: Move...
* testsuite/23_containers/multiset/modifiers/dr130.cc: ...here.
* testsuite/23_containers/set/dr130.cc: Move...
* testsuite/23_containers/set/modifiers/dr130.cc: ...here.
From-SVN: r199924
Diffstat (limited to 'libstdc++-v3/testsuite/23_containers/multiset')
-rw-r--r-- | libstdc++-v3/testsuite/23_containers/multiset/modifiers/dr130.cc (renamed from libstdc++-v3/testsuite/23_containers/multiset/dr130.cc) | 0 | ||||
-rw-r--r-- | libstdc++-v3/testsuite/23_containers/multiset/modifiers/erase/abi_tag.cc | 38 | ||||
-rw-r--r-- | libstdc++-v3/testsuite/23_containers/multiset/modifiers/erase/dr130-linkage-check.cc | 40 |
3 files changed, 78 insertions, 0 deletions
diff --git a/libstdc++-v3/testsuite/23_containers/multiset/dr130.cc b/libstdc++-v3/testsuite/23_containers/multiset/modifiers/dr130.cc index fc8aaf6d825..fc8aaf6d825 100644 --- a/libstdc++-v3/testsuite/23_containers/multiset/dr130.cc +++ b/libstdc++-v3/testsuite/23_containers/multiset/modifiers/dr130.cc diff --git a/libstdc++-v3/testsuite/23_containers/multiset/modifiers/erase/abi_tag.cc b/libstdc++-v3/testsuite/23_containers/multiset/modifiers/erase/abi_tag.cc new file mode 100644 index 00000000000..bbe2d054d94 --- /dev/null +++ b/libstdc++-v3/testsuite/23_containers/multiset/modifiers/erase/abi_tag.cc @@ -0,0 +1,38 @@ +// { dg-do compile } +// { dg-options -std=c++11 } + +// Copyright (C) 2013 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. + +// Under Section 7 of GPL version 3, you are granted additional +// permissions described in the GCC Runtime Library Exception, version +// 3.1, as published by the Free Software Foundation. + +// You should have received a copy of the GNU General Public License and +// a copy of the GCC Runtime Library Exception along with this program; +// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see +// <http://www.gnu.org/licenses/>. + +// Test that the C++11 variants have an ABI tag + +#include <set> + +using container = std::multiset<int>; +using iterator = typename container::iterator; +using const_iterator = typename container::const_iterator; + +// { dg-final { scan-assembler "_ZNSt8multisetIiSt4lessIiESaIiEE5eraseB5cxx11ESt23_Rb_tree_const_iteratorIiE" } } +iterator (container::*p1)(const_iterator) = &container::erase; + +// { dg-final { scan-assembler "_ZNSt8multisetIiSt4lessIiESaIiEE5eraseB5cxx11ESt23_Rb_tree_const_iteratorIiES5_" } } +iterator (container::*p2)(const_iterator, const_iterator) = &container::erase; diff --git a/libstdc++-v3/testsuite/23_containers/multiset/modifiers/erase/dr130-linkage-check.cc b/libstdc++-v3/testsuite/23_containers/multiset/modifiers/erase/dr130-linkage-check.cc new file mode 100644 index 00000000000..9155b648c15 --- /dev/null +++ b/libstdc++-v3/testsuite/23_containers/multiset/modifiers/erase/dr130-linkage-check.cc @@ -0,0 +1,40 @@ +// { dg-require-effective-target ia32 } +// { dg-require-sharedlib "" } +// { dg-options "-fno-inline -std=gnu++11 ./testsuite_shared.so" } +// 2013-06-03 Benjamin Kosnik <bkoz@redhat..com> +// +// Copyright (C) 2013 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 +// <http://www.gnu.org/licenses/>. + +#include <testsuite_containers.h> + +int main() +{ + typedef std::multiset<int> container_type; + + { + container_type s { 0, 1, 2 }; + __gnu_test::linkage_check_cxx98_cxx11_erase(s); + } + + { + container_type s { 0, 1, 2 }; + __gnu_test::linkage_check_cxx98_cxx11_erase_iterators(s); + } + + return 0; +} |