aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.6/libstdc++-v3
diff options
context:
space:
mode:
authorJing Yu <jingyu@google.com>2012-02-15 15:40:16 -0800
committerJing Yu <jingyu@google.com>2012-02-15 15:40:16 -0800
commit3f73d6ef90458b45bbbb33ef4c2b174d4662a22d (patch)
tree1b5f0d96c51b51168b3713058a1b62e92f1136eb /gcc-4.6/libstdc++-v3
parentd7030123e04baab5dbff9c9ee04c0de99bd9a774 (diff)
downloadtoolchain_gcc-3f73d6ef90458b45bbbb33ef4c2b174d4662a22d.tar.gz
toolchain_gcc-3f73d6ef90458b45bbbb33ef4c2b174d4662a22d.tar.bz2
toolchain_gcc-3f73d6ef90458b45bbbb33ef4c2b174d4662a22d.zip
Sync down FSF r184235@google/gcc-4_6_2-mobile branch
1) Get mostly new patches from FSF gcc-4.6 branch 2) Fix PR52129 3) Insert GNU-stack note for all ARM targets Change-Id: I2b9926981210e517e4021242908074319a91d6bd
Diffstat (limited to 'gcc-4.6/libstdc++-v3')
-rw-r--r--gcc-4.6/libstdc++-v3/ChangeLog226
-rw-r--r--gcc-4.6/libstdc++-v3/ChangeLog.google-4_6105
-rw-r--r--gcc-4.6/libstdc++-v3/acinclude.m411
-rw-r--r--gcc-4.6/libstdc++-v3/config/abi/pre/gnu-versioned-namespace.ver56
-rw-r--r--gcc-4.6/libstdc++-v3/config/abi/pre/gnu.ver11
-rw-r--r--gcc-4.6/libstdc++-v3/config/locale/generic/c_locale.cc12
-rw-r--r--gcc-4.6/libstdc++-v3/config/locale/generic/c_locale.h2
-rw-r--r--gcc-4.6/libstdc++-v3/config/locale/generic/time_members.cc8
-rwxr-xr-xgcc-4.6/libstdc++-v3/configure42
-rw-r--r--gcc-4.6/libstdc++-v3/configure.ac6
-rw-r--r--gcc-4.6/libstdc++-v3/include/backward/hashtable.h26
-rw-r--r--gcc-4.6/libstdc++-v3/include/bits/basic_string.h8
-rw-r--r--gcc-4.6/libstdc++-v3/include/bits/c++0x_warning.h6
-rw-r--r--gcc-4.6/libstdc++-v3/include/bits/c++config37
-rw-r--r--gcc-4.6/libstdc++-v3/include/bits/deque.tcc4
-rw-r--r--gcc-4.6/libstdc++-v3/include/bits/functional_hash.h80
-rw-r--r--gcc-4.6/libstdc++-v3/include/bits/hashtable.h12
-rw-r--r--gcc-4.6/libstdc++-v3/include/bits/random.tcc8
-rw-r--r--gcc-4.6/libstdc++-v3/include/bits/regex.h2
-rw-r--r--gcc-4.6/libstdc++-v3/include/bits/shared_ptr.h10
-rw-r--r--gcc-4.6/libstdc++-v3/include/bits/shared_ptr_base.h9
-rw-r--r--gcc-4.6/libstdc++-v3/include/bits/stl_algo.h263
-rw-r--r--gcc-4.6/libstdc++-v3/include/bits/stl_algobase.h2
-rw-r--r--gcc-4.6/libstdc++-v3/include/bits/stl_bvector.h5
-rw-r--r--gcc-4.6/libstdc++-v3/include/bits/stl_map.h5
-rw-r--r--gcc-4.6/libstdc++-v3/include/bits/stl_multimap.h5
-rw-r--r--gcc-4.6/libstdc++-v3/include/bits/stl_numeric.h13
-rw-r--r--gcc-4.6/libstdc++-v3/include/bits/stl_tree.h10
-rw-r--r--gcc-4.6/libstdc++-v3/include/bits/stl_uninitialized.h21
-rw-r--r--gcc-4.6/libstdc++-v3/include/bits/stl_vector.h69
-rw-r--r--gcc-4.6/libstdc++-v3/include/bits/unique_ptr.h2
-rw-r--r--gcc-4.6/libstdc++-v3/include/bits/vector.tcc15
-rw-r--r--gcc-4.6/libstdc++-v3/include/c_global/cmath10
-rw-r--r--gcc-4.6/libstdc++-v3/include/c_global/cwchar4
-rw-r--r--gcc-4.6/libstdc++-v3/include/debug/bitset2
-rw-r--r--gcc-4.6/libstdc++-v3/include/debug/deque6
-rw-r--r--gcc-4.6/libstdc++-v3/include/debug/map.h4
-rw-r--r--gcc-4.6/libstdc++-v3/include/debug/multimap.h4
-rw-r--r--gcc-4.6/libstdc++-v3/include/debug/unordered_map8
-rw-r--r--gcc-4.6/libstdc++-v3/include/debug/unordered_set8
-rw-r--r--gcc-4.6/libstdc++-v3/include/debug/vector17
-rw-r--r--gcc-4.6/libstdc++-v3/include/ext/type_traits.h59
-rw-r--r--gcc-4.6/libstdc++-v3/include/ext/vstring.h8
-rw-r--r--gcc-4.6/libstdc++-v3/include/parallel/algo.h12
-rw-r--r--gcc-4.6/libstdc++-v3/include/profile/bitset2
-rw-r--r--gcc-4.6/libstdc++-v3/include/profile/map.h4
-rw-r--r--gcc-4.6/libstdc++-v3/include/profile/multimap.h4
-rw-r--r--gcc-4.6/libstdc++-v3/include/profile/vector2
-rw-r--r--gcc-4.6/libstdc++-v3/include/std/bitset29
-rw-r--r--gcc-4.6/libstdc++-v3/include/std/complex11
-rw-r--r--gcc-4.6/libstdc++-v3/include/std/condition_variable23
-rw-r--r--gcc-4.6/libstdc++-v3/include/std/system_error2
-rw-r--r--gcc-4.6/libstdc++-v3/include/std/thread2
-rw-r--r--gcc-4.6/libstdc++-v3/include/std/typeindex4
-rw-r--r--gcc-4.6/libstdc++-v3/include/tr1/complex9
-rw-r--r--gcc-4.6/libstdc++-v3/include/tr1/poly_hermite.tcc4
-rw-r--r--gcc-4.6/libstdc++-v3/libsupc++/del_op.cc8
-rw-r--r--gcc-4.6/libstdc++-v3/libsupc++/new1
-rw-r--r--gcc-4.6/libstdc++-v3/libsupc++/typeinfo2
-rw-r--r--gcc-4.6/libstdc++-v3/src/compatibility-c++0x.cc59
-rw-r--r--gcc-4.6/libstdc++-v3/src/compatibility-ldbl.cc11
-rw-r--r--gcc-4.6/libstdc++-v3/src/hash-long-double-aux.cc50
-rw-r--r--gcc-4.6/libstdc++-v3/src/hash-long-double-tr1-aux.cc56
-rw-r--r--gcc-4.6/libstdc++-v3/src/hash_c++0x.cc26
-rw-r--r--gcc-4.6/libstdc++-v3/src/hash_tr1.cc6
-rw-r--r--gcc-4.6/libstdc++-v3/testsuite/18_support/headers/cstdbool/std_c++0x_neg.cc2
-rw-r--r--gcc-4.6/libstdc++-v3/testsuite/18_support/headers/cstdint/std_c++0x_neg.cc2
-rw-r--r--gcc-4.6/libstdc++-v3/testsuite/19_diagnostics/headers/system_error/std_c++0x_neg.cc2
-rw-r--r--gcc-4.6/libstdc++-v3/testsuite/20_util/allocator/51626.cc66
-rw-r--r--gcc-4.6/libstdc++-v3/testsuite/20_util/headers/type_traits/std_c++0x_neg.cc2
-rw-r--r--gcc-4.6/libstdc++-v3/testsuite/20_util/shared_ptr/cons/43820_neg.cc2
-rw-r--r--gcc-4.6/libstdc++-v3/testsuite/20_util/weak_ptr/comparison/cmp_neg.cc4
-rw-r--r--gcc-4.6/libstdc++-v3/testsuite/22_locale/time_get/get_weekday/char/38081-1.cc10
-rw-r--r--gcc-4.6/libstdc++-v3/testsuite/22_locale/time_get/get_weekday/char/38081-2.cc12
-rw-r--r--gcc-4.6/libstdc++-v3/testsuite/23_containers/bitset/cons/50268.cc84
-rw-r--r--gcc-4.6/libstdc++-v3/testsuite/23_containers/deque/modifiers/erase/3.cc6
-rw-r--r--gcc-4.6/libstdc++-v3/testsuite/23_containers/deque/modifiers/erase/50529.cc38
-rw-r--r--gcc-4.6/libstdc++-v3/testsuite/23_containers/headers/array/std_c++0x_neg.cc2
-rw-r--r--gcc-4.6/libstdc++-v3/testsuite/23_containers/headers/tuple/std_c++0x_neg.cc2
-rw-r--r--gcc-4.6/libstdc++-v3/testsuite/23_containers/headers/unordered_map/std_c++0x_neg.cc2
-rw-r--r--gcc-4.6/libstdc++-v3/testsuite/23_containers/headers/unordered_set/std_c++0x_neg.cc2
-rw-r--r--gcc-4.6/libstdc++-v3/testsuite/23_containers/map/modifiers/erase/51142.cc38
-rw-r--r--gcc-4.6/libstdc++-v3/testsuite/23_containers/multimap/modifiers/erase/51142.cc38
-rw-r--r--gcc-4.6/libstdc++-v3/testsuite/23_containers/multiset/modifiers/erase/51142.cc38
-rw-r--r--gcc-4.6/libstdc++-v3/testsuite/23_containers/set/modifiers/erase/51142.cc38
-rw-r--r--gcc-4.6/libstdc++-v3/testsuite/23_containers/unordered_map/erase/51142.cc41
-rw-r--r--gcc-4.6/libstdc++-v3/testsuite/23_containers/unordered_multimap/erase/51142.cc41
-rw-r--r--gcc-4.6/libstdc++-v3/testsuite/23_containers/unordered_multiset/erase/51142.cc41
-rw-r--r--gcc-4.6/libstdc++-v3/testsuite/23_containers/unordered_set/erase/51142.cc41
-rw-r--r--gcc-4.6/libstdc++-v3/testsuite/23_containers/vector/modifiers/erase/50529.cc38
-rw-r--r--gcc-4.6/libstdc++-v3/testsuite/23_containers/vector/requirements/dr438/assign_neg.cc2
-rw-r--r--gcc-4.6/libstdc++-v3/testsuite/23_containers/vector/requirements/dr438/constructor_1_neg.cc2
-rw-r--r--gcc-4.6/libstdc++-v3/testsuite/23_containers/vector/requirements/dr438/constructor_2_neg.cc2
-rw-r--r--gcc-4.6/libstdc++-v3/testsuite/23_containers/vector/requirements/dr438/insert_neg.cc2
-rw-r--r--gcc-4.6/libstdc++-v3/testsuite/25_algorithms/inplace_merge/49559.cc72
-rw-r--r--gcc-4.6/libstdc++-v3/testsuite/25_algorithms/inplace_merge/moveable.cc60
-rw-r--r--gcc-4.6/libstdc++-v3/testsuite/25_algorithms/inplace_merge/moveable2.cc62
-rw-r--r--gcc-4.6/libstdc++-v3/testsuite/25_algorithms/stable_sort/49559.cc68
-rw-r--r--gcc-4.6/libstdc++-v3/testsuite/26_numerics/cmath/51083.cc62
-rw-r--r--gcc-4.6/libstdc++-v3/testsuite/26_numerics/complex/50880.cc53
-rw-r--r--gcc-4.6/libstdc++-v3/testsuite/26_numerics/complex/51083.cc54
-rw-r--r--gcc-4.6/libstdc++-v3/testsuite/26_numerics/headers/ccomplex/std_c++0x_neg.cc2
-rw-r--r--gcc-4.6/libstdc++-v3/testsuite/26_numerics/headers/cfenv/std_c++0x_neg.cc2
-rw-r--r--gcc-4.6/libstdc++-v3/testsuite/26_numerics/headers/ctgmath/std_c++0x_neg.cc2
-rw-r--r--gcc-4.6/libstdc++-v3/testsuite/26_numerics/headers/random/std_c++0x_neg.cc2
-rw-r--r--gcc-4.6/libstdc++-v3/testsuite/27_io/headers/cinttypes/std_c++0x_neg.cc2
-rw-r--r--gcc-4.6/libstdc++-v3/testsuite/28_regex/algorithms/regex_replace/char/51711.cc31
-rw-r--r--gcc-4.6/libstdc++-v3/testsuite/28_regex/algorithms/regex_replace/wchar_t/51711.cc31
-rw-r--r--gcc-4.6/libstdc++-v3/testsuite/28_regex/headers/regex/std_c++0x_neg.cc2
-rw-r--r--gcc-4.6/libstdc++-v3/testsuite/29_atomics/headers/atomic/std_c++0x_neg.cc2
-rw-r--r--gcc-4.6/libstdc++-v3/testsuite/30_threads/condition_variable_any/50862.cc80
-rw-r--r--gcc-4.6/libstdc++-v3/testsuite/30_threads/headers/condition_variable/std_c++0x_neg.cc2
-rw-r--r--gcc-4.6/libstdc++-v3/testsuite/30_threads/headers/future/std_c++0x_neg.cc2
-rw-r--r--gcc-4.6/libstdc++-v3/testsuite/30_threads/headers/mutex/std_c++0x_neg.cc2
-rw-r--r--gcc-4.6/libstdc++-v3/testsuite/30_threads/headers/thread/std_c++0x_neg.cc2
-rw-r--r--gcc-4.6/libstdc++-v3/testsuite/ext/profile/mutex_extensions_neg.cc2
-rw-r--r--gcc-4.6/libstdc++-v3/testsuite/ext/type_traits/add_unsigned_floating_neg.cc2
-rw-r--r--gcc-4.6/libstdc++-v3/testsuite/ext/type_traits/add_unsigned_integer_neg.cc2
-rw-r--r--gcc-4.6/libstdc++-v3/testsuite/ext/type_traits/remove_unsigned_floating_neg.cc2
-rw-r--r--gcc-4.6/libstdc++-v3/testsuite/ext/type_traits/remove_unsigned_integer_neg.cc2
-rw-r--r--gcc-4.6/libstdc++-v3/testsuite/tr1/8_c_compatibility/cmath/51083.cc62
-rw-r--r--gcc-4.6/libstdc++-v3/testsuite/tr1/8_c_compatibility/complex/50880.cc51
-rw-r--r--gcc-4.6/libstdc++-v3/testsuite/tr1/8_c_compatibility/complex/51083.cc54
-rw-r--r--gcc-4.6/libstdc++-v3/testsuite/util/testsuite_abi.cc3
-rw-r--r--gcc-4.6/libstdc++-v3/testsuite/util/testsuite_rvalref.h1
125 files changed, 2448 insertions, 476 deletions
diff --git a/gcc-4.6/libstdc++-v3/ChangeLog b/gcc-4.6/libstdc++-v3/ChangeLog
index 9df48f81d..7036b53c4 100644
--- a/gcc-4.6/libstdc++-v3/ChangeLog
+++ b/gcc-4.6/libstdc++-v3/ChangeLog
@@ -1,7 +1,233 @@
+2012-01-03 Chase Douglas <chase.douglas@canonical.com>
+ Jonathan Wakely <jwakely.gcc@gmail.com>
+
+ * include/bits/shared_ptr.h: Default copy ctor and assignment.
+ * include/bits/shared_ptr_base.h: Likewise.
+ * testsuite/20_util/shared_ptr/cons/43820_neg.cc: Adjust dg-error
+ line numbers.
+ * testsuite/20_util/weak_ptr/comparison/cmp_neg.cc: Likewise.
+
+2011-12-30 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR libstdc++/51711
+ * include/bits/regex.h (regex_replace): Fix thinko.
+ * testsuite/28_regex/algorithms/regex_replace/char/51711.cc: New.
+ * testsuite/28_regex/algorithms/regex_replace/wchar_t/51711.cc:
+ Likewise.
+
+2011-12-19 Jonathan Wakely <jwakely.gcc@gmail.com>
+
+ PR libstdc++/51626
+ * include/bits/stl_uninitialized.h (_Construct_default_a_impl): Define
+ overloaded functions to conditionally use allocator::construct.
+ (_Construct_default_a): Define to dispatch to appropriate
+ _Construct_default_a_impl overload.
+ (__uninitialized_default_a, __uninitialized_default_n_a): Use
+ _Construct_default_a.
+ * testsuite/20_util/allocator/51626.cc: New.
+
+2011-12-19 Jonathan Wakely <jwakely.gcc@gmail.com>
+
+ * testsuite/ext/type_traits/remove_unsigned_integer_neg.cc: Adjust
+ dg-error line numbers.
+ * testsuite/ext/type_traits/add_unsigned_floating_neg.cc: Likewise.
+ * testsuite/ext/type_traits/remove_unsigned_floating_neg.cc: Likewise.
+ * testsuite/ext/type_traits/add_unsigned_integer_neg.cc: Likewise.
+
+2011-12-19 Jonathan Wakely <jwakely.gcc@gmail.com>
+
+ * include/c_global/cmath: Update copyright years.
+ * include/ext/type_traits.h: Likewise.
+
+2011-12-19 Jonathan Wakely <jwakely.gcc@gmail.com>
+
+ Backport from mainline
+ 2011-11-13 Paolo Carlini <paolo.carlini@oracle.com>
+
+ * include/c_global/cmath (atan2, pow): Simplify constraining on the
+ return type.
+
+ Backport from mainline
+ 2011-11-12 Jonathan Wakely <jwakely.gcc@gmail.com>
+
+ PR libstdc++/51083
+ * include/ext/type_traits.h (__promote): Only define __type member
+ for integral and floating point types, to prevent math functions
+ participating in overload resolution for other types.
+ (__promote_2, __promote_3, __promote_4): Use __promote in default
+ template argument values, so deduction only succeeds for integral and
+ floating point types.
+ * testsuite/26_numerics/cmath/51083.cc: New.
+ * testsuite/26_numerics/complex/51083.cc: New.
+ * testsuite/tr1/8_c_compatibility/cmath/51083.cc: New.
+ * testsuite/tr1/8_c_compatibility/complex/51083.cc: New.
+
+2011-12-19 Jonathan Wakely <jwakely.gcc@gmail.com>
+
+ PR libstdc++/50862
+ * include/std/condition_variable (condition_variable_any::wait): Fix
+ deadlock and ensure _Lock::lock() is called on exit.
+ * testsuite/30_threads/condition_variable_any/50862.cc: New.
+
+2011-12-18 Jonathan Wakely <jwakely.gcc@gmail.com>
+
+ PR libstdc++/51540
+ * include/bits/stl_numeric.h (partial_sum): Adjust doxygen comments.
+
+2011-11-20 Andreas Tobler <andreast@fgznet.ch>
+
+ * configure: Regenerate.
+
+2011-11-16 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR libstdc++/51142
+ * include/debug/unordered_map (unordered_map<>::erase(iterator),
+ unordered_multimap<>::erase(iterator)): Add, consistently with
+ LWG 2059.
+ * include/debug/unordered_set (unordered_set<>::erase(iterator),
+ unordered_multiset<>::erase(iterator)): Likewise.
+ * include/debug/map.h (map<>::erase(iterator)): Likewise.
+ * include/debug/multimap.h (multimap<>::erase(iterator)): Likewise.
+ * include/profile/map.h (map<>::erase(iterator)): Likewise.
+ * include/profile/multimap.h (multimap<>::erase(iterator)): Likewise.
+ * include/bits/hashtable.h (_Hashtable<>::erase(iterator)): Likewise.
+ * include/bits/stl_map.h (map<>::erase(iterator)): Likewise.
+ * include/bits/stl_multimap.h (multimap<>::erase(iterator)): Likewise.
+ * include/bits/stl_tree.h (_Rb_tree<>::erase(iterator)): Likewise.
+ * testsuite/23_containers/unordered_map/erase/51142.cc: New.
+ * testsuite/23_containers/multimap/modifiers/erase/51142.cc: Likewise.
+ * testsuite/23_containers/set/modifiers/erase/51142.cc: Likewise.
+ * testsuite/23_containers/unordered_multimap/erase/51142.cc: Likewise.
+ * testsuite/23_containers/unordered_set/erase/51142.cc: Likewise.
+ * testsuite/23_containers/multiset/modifiers/erase/51142.cc: Likewise.
+ * testsuite/23_containers/unordered_multiset/erase/51142.cc: Likewise.
+ * testsuite/23_containers/map/modifiers/erase/51142.cc: Likewise.
+
+2011-11-15 Jason Dick <dickphd@gmail.com>
+
+ PR libstdc++/51133
+ * include/tr1/poly_hermite.tcc (__poly_hermite_recursion): Fix
+ wrong sign in recursion relation.
+
+2011-11-02 Richard B. Kreckel <kreckel@ginac.de>
+ Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR libstdc++/50880
+ * include/std/complex (__complex_acosh): Fix in a better way,
+ use Kahan's formula.
+ * include/tr1/complex (__complex_acosh): Likewise.
+
+2011-11-02 Richard B. Kreckel <kreckel@ginac.de>
+ Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR libstdc++/50880
+ * include/std/complex (__complex_acosh): Fix for __z.real() < 0.
+ * include/tr1/complex (__complex_acosh): Likewise.
+ * testsuite/26_numerics/complex/50880.cc: New.
+ * testsuite/tr1/8_c_compatibility/complex/50880.cc: Likewise.
+
+2011-10-26 Release Manager
+
+ * GCC 4.6.2 released.
+
+2011-10-05 Benjamin Kosnik <bkoz@redhat.com
+ Jonathan Wakely <jwakely.gcc@gmail.com>
+
+ PR libstdc++/48698
+ * acinclude.m4 (GLIBCXX_ENABLE_SYMVERS): Set libtool_VERSION here.
+ * configure.ac: Move AC_SUBST of libtool_VERSION past call to
+ GLIBCXX_ENABLE_SYMVERS.
+ * configure: Regenerate.
+ * include/bits/c++config: Use __7 as versioned namespace name.
+ * config/abi/pre/gnu-versioned-namespace.ver: Change mangling as
+ per above.
+ * include/c_global/cwchar: Adjust nested namespaces.
+ * testsuite/20_util/bind/48698.cc: Add test case.
+ * testsuite/ext/profile/mutex_extensions_neg.cc: Change line number.
+
+2011-09-30 François Dumont <fdumont@gcc.gnu.org>
+
+ * include/debug/vector (vector<>::erase(iterator, iterator)): Check
+ iterators equality using normal iterators.
+ * include/debug/deque (deque<>::erase(iterator, iterator)): Likewise.
+
+2011-09-30 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR libstdc++/50529
+ * include/bits/vector.tcc (vector<>::erase(iterator, iterator)):
+ Fix to do nothing if the range is empty.
+ * include/bits/stl_bvector.h: Likewise.
+ * include/bits/deque.tcc: Likewise.
+ * include/debug/vector: Adjust.
+ * include/debug/deque: Likewise.
+ * testsuite/23_containers/vector/modifiers/erase/50529.cc: New.
+ * testsuite/23_containers/deque/modifiers/erase/50529.cc: Likewise.
+ * testsuite/23_containers/deque/modifiers/erase/3.cc: Adjust.
+
+2011-09-27 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR libstdc++/49559
+ * include/bits/stl_algo.h (__move_merge_backward): Remove.
+ (__move_merge_adaptive, __move_merge_adaptive_backward): New.
+ (__merge_adaptive): Use the latter two.
+ (__rotate_adaptive): Avoid self move-assignment.
+ * include/bits/stl_algobase.h (move_backward): Fix comment.
+ * testsuite/25_algorithms/stable_sort/49559.cc: New.
+ * testsuite/25_algorithms/inplace_merge/49559.cc: Likewise.
+ * testsuite/25_algorithms/inplace_merge/moveable.cc: Extend.
+ * testsuite/25_algorithms/inplace_merge/moveable2.cc: Likewise.
+ * testsuite/util/testsuite_rvalref.h (rvalstruct::operator=
+ (rvalstruct&&)): Check for self move-assignment.
+
+2011-09-24 John Salmon <john.salmon@deshaw.com>
+
+ PR libstdc++/50510
+ * include/bits/random.tcc (seed_seq::generate): Fix computation.
+
+2011-09-24 John Salmon <john.salmon@deshaw.com>
+
+ PR libstdc++/50509
+ * include/bits/random.tcc (seed_seq::generate): Fix computation.
+
+2011-09-02 Paolo Carlini <paolo.carlini@oracle.com>
+
+ * include/bits/hashtable.h (_Hashtable<>::_Hashtable(_Hashtable&&)):
+ rearrange to consistently update __ht._M_rehash_policy before using
+ _M_next_bkt on it.
+
+2011-09-02 Paolo Carlini <paolo.carlini@oracle.com>
+ Marc Glisse <marc.glisse@normalesup.org>
+
+ PR libstdc++/50268
+ * include/std/bitset (struct _Sanitize_val): Add.
+ (bitset<>::bitset(unsigned long long)): Fix.
+ * testsuite/23_containers/bitset/cons/50268.cc: New.
+
+2011-07-31 Paolo Carlini <paolo.carlini@oracle.com>
+
+ * include/parallel/algo.h: Trivial uglification fixes.
+
+2011-07-31 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR libstdc++/49925
+ * include/bits/shared_ptr.h (make_shared): Qualify allocate_shared
+ with std::.
+ * include/bits/shared_ptr_base.h (__make_shared): Likewise.
+
2011-07-27 Jeffrey Yasskin <jyasskin@google.com>
* testsuite/20_util/weak_ptr/comparison/cmp_neg.cc: Updated.
+2011-07-22 Uros Bizjak <ubizjak@gmail.com>
+
+ Backport from mainline
+ 2011-06-07 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR libstdc++/49293
+ * testsuite/22_locale/time_get/get_weekday/char/38081-1.cc: Tweak
+ for glibc 2.14.
+ * testsuite/22_locale/time_get/get_weekday/char/38081-2.cc: Likewise.
+
2011-06-27 Release Manager
* GCC 4.6.1 released.
diff --git a/gcc-4.6/libstdc++-v3/ChangeLog.google-4_6 b/gcc-4.6/libstdc++-v3/ChangeLog.google-4_6
index 647e9871a..7164214f3 100644
--- a/gcc-4.6/libstdc++-v3/ChangeLog.google-4_6
+++ b/gcc-4.6/libstdc++-v3/ChangeLog.google-4_6
@@ -1,3 +1,108 @@
+2012-01-05 Paul Pluzhnikov <ppluzhnikov@google.com>
+
+ Backport r178624 from google/integration.
+
+ 2011-09-06 Paul Pluzhnikov <ppluzhnikov@google.com>
+
+ * include/bits/stl_vector.h (_M_is_valid): New function.
+ (begin, end, size, capacity, swap, clear): Call it.
+ * include/bits/vector.tcc (operator=): Likewise.
+
+ * libstdc++-v3/testsuite/23_containers/vector/requirements/dr438/assign_neg.cc:
+ Adjust line numbers.
+ * libstdc++-v3/testsuite/23_containers/vector/requirements/dr438/insert_neg.cc:
+ Likewise.
+ * libstdc++-v3/testsuite/23_containers/vector/requirements/dr438/constructor_1_neg.cc:
+ Likewise.
+ * libstdc++-v3/testsuite/23_containers/vector/requirements/dr438/constructor_2_neg.cc:
+ Likewise.
+
+2011-12-19 H.J. Lu <hongjiu.lu@intel.com>
+ Jing Yu <jingyu@google.com>
+
+ * config/locale/generic/c_locale.h (__convert_from_v): Replace NULL
+ with 0.
+ * config/locale/generic/c_locale.cc (__convert_to_v): Likewise.
+ * config/locale/generic/time_members.cc (_M_put): Likewise.
+
+2011-12-17 Easwaran Raman <eraman@google.com>
+ Backport r182443 from google/main.
+
+ 2011-12-17 Easwaran Raman <eraman@google.com>
+
+ * libsupc++/del_op.cc (delete): Define a new variant
+ void operator delete(void*, std::size_t).
+ * libsupc++/new (delete): Declare
+ void operator delete(void*, std::size_t) throw();
+ * testsuite/util/testsuite_abi.cc (check_version): Add new
+ known version GLIBCXX_3.4.18.
+ * config/abi/pre/gnu.ver: Add new symbol _ZdlPv[jmy] at version
+ GLIBCXX_3.4.18.
+
+2011-12-16 Jeffrey Yasskin <jyasskin@google.com>
+
+ Backport from revs 181473, 182392
+
+ 2011-12-15 Paolo Carlini <paolo.carlini@oracle.com>
+ Jonathan Wakely <jwakely.gcc@gmail.com>
+
+ PR libstdc++/51558
+ * include/bits/functional_hash.h (struct hash): Add static_assert.
+ * src/compatibility-c++0x.cc: Adjust compatibility definitions.
+ * testsuite/23_containers/unordered_map/erase/51142.cc: Adjust.
+ * testsuite/23_containers/unordered_set/erase/51142.cc: Likewise.
+ * testsuite/23_containers/unordered_multimap/erase/51142.cc: Likewise.
+ * testsuite/23_containers/unordered_multiset/erase/51142.cc: Likewise.
+
+ 2011-11-18 Paolo Carlini <paolo.carlini@oracle.com>
+
+ * src/hash-long-double-aux.cc: Rename to...
+ * src/hash-long-double-tr1-aux.cc: ... this.
+ * src/compatibility-ldbl.cc: Adjust.
+ * src/hash_tr1.cc: Likewise.
+ * src/hash_c++0x.cc: Don't use src/hash-long-double-aux.cc.
+ * include/bits/functional_hash.h (hash<_Tp*>::operator(), specs
+ for integer types, hash<float>::operator(), hash<double>::operator(),
+ hash<long double>::operator()): Declare noexcept.
+ * include/debug/bitset (hash<__debug::bitset>::operator()): Likewise.
+ * include/debug/vector (hash<__debug::vector>::operator()): Likewise.
+ * include/std/system_error (hash<error_code>::operator()): Likewise.
+ * include/std/thread (hash<thread::id>::operator()): Likewise.
+ * include/std/bitset (hash<bitset>::operator()): Likewise.
+ * include/std/typeindex (hash<type_index>::operator()): Likewise.
+ * include/profile/bitset (hash<__profile::vector>::operator()):
+ Likewise.
+ * include/profile/vector (hash<__profile::vector>::operator()):
+ Likewise.
+ * include/ext/vstring.h (hash<__vstring>::operator(),
+ hash<__wvstring>::operator(), hash<__u16vstring>::operator(),
+ hash<__u32vstring>::operator()): Likewise.
+ * include/bits/shared_ptr.h (hash<shared_ptr>::operator()): Likewise.
+ * include/bits/shared_ptr_base.h (hash<__shared_ptr>::operator()):
+ Likewise.
+ * include/bits/unique_ptr.h (hash<unique_ptr>::operator()): Likewise.
+ * include/bits/basic_string.h (hash<string>::operator(),
+ hash<wstring>::operator(), hash<u16string>::operator(),
+ hash<u32string>::operator()): Likewise.
+ * include/bits/vector.tcc (hash<vector>::operator()): Likewise.
+ * include/bits/stl_bvector.h (hash<vector>::operator()): Likewise.
+ * libsupc++/typeinfo (type_info::hash_code): Use noexcept instead of
+ throw().
+
+2011-12-06 Jeffrey Yasskin <jyasskin@google.com>
+
+ Backport from rev 180707
+
+ 2011-10-31 Jason Merrill <jason@redhat.com>
+
+ PR c++/50920
+ * include/bits/c++0x_warning.h: Change -std=c++0x to -std=c++11.
+
+2011-11-06 Xinliang David Li <davidxl@google.com>
+
+ backport 181071 from trunk
+ * include/backward/hashtable.h: Make __stl_prime_list comdat.
+
2011-08-01 Jeffrey Yasskin <jyasskin@google.com>
* include/bits/stl_heap.h(make_heap): Add a newline back.
diff --git a/gcc-4.6/libstdc++-v3/acinclude.m4 b/gcc-4.6/libstdc++-v3/acinclude.m4
index ed8b129c2..d6735e9b5 100644
--- a/gcc-4.6/libstdc++-v3/acinclude.m4
+++ b/gcc-4.6/libstdc++-v3/acinclude.m4
@@ -2861,10 +2861,15 @@ dnl
dnl Add version tags to symbols in shared library (or not), additionally
dnl marking other symbols as private/local (or not).
dnl
+dnl Sets libtool_VERSION, and determines shared library SONAME.
+dnl
+dnl This depends on GLIBCXX CHECK_LINKER_FEATURES, but without it assumes no.
+dnl
dnl --enable-symvers=style adds a version script to the linker call when
dnl creating the shared library. The choice of version script is
dnl controlled by 'style'.
dnl --disable-symvers does not.
+dnl
dnl + Usage: GLIBCXX_ENABLE_SYMVERS[(DEFAULT)]
dnl Where DEFAULT is either 'yes' or 'no'. Passing `yes' tries to
dnl choose a default style based on linker characteristics. Passing
@@ -3001,7 +3006,10 @@ changequote([,])dnl
fi
fi
-# Everything parsed; figure out what file to use.
+# For libtool versioning info, format is CURRENT:REVISION:AGE
+libtool_VERSION=6:16:0
+
+# Everything parsed; figure out what files and settings to use.
case $enable_symvers in
no)
SYMVER_FILE=config/abi/pre/none.ver
@@ -3012,6 +3020,7 @@ case $enable_symvers in
[Define to use GNU versioning in the shared library.])
;;
gnu-versioned-namespace)
+ libtool_VERSION=7:0:0
SYMVER_FILE=config/abi/pre/gnu-versioned-namespace.ver
AC_DEFINE(_GLIBCXX_SYMVER_GNU_NAMESPACE, 1,
[Define to use GNU namespace versioning in the shared library.])
diff --git a/gcc-4.6/libstdc++-v3/config/abi/pre/gnu-versioned-namespace.ver b/gcc-4.6/libstdc++-v3/config/abi/pre/gnu-versioned-namespace.ver
index ab9380c37..32bcf67d8 100644
--- a/gcc-4.6/libstdc++-v3/config/abi/pre/gnu-versioned-namespace.ver
+++ b/gcc-4.6/libstdc++-v3/config/abi/pre/gnu-versioned-namespace.ver
@@ -20,23 +20,23 @@
## with this library; see the file COPYING3. If not see
## <http://www.gnu.org/licenses/>.
-GLIBCXX_5.0 {
+GLIBCXX_7.0 {
global:
# Names inside the 'extern' block are demangled names.
extern "C++"
{
- std::_6::*;
+ std::__7::*;
std::*
};
# locale
- _ZNSt2_69has_facetINS_*;
+ _ZNSt3__79has_facetINS_*;
# hash
- _ZNSt8__detail2_612__prime_listE;
- _ZNSt3tr18__detail2_612__prime_listE;
+ _ZNSt8__detail3__712__prime_listE;
+ _ZNSt3tr18__detail3__712__prime_listE;
# thread/mutex/condition_variable/future
__once_proxy;
@@ -73,41 +73,41 @@ GLIBCXX_5.0 {
_ZTv0_n*;
# std::__detail::_List_node_base
- _ZNSt8__detail2_615_List_node_base7_M_hook*;
- _ZNSt8__detail2_615_List_node_base9_M_unhookEv;
- _ZNSt8__detail2_615_List_node_base10_M_reverseEv;
- _ZNSt8__detail2_615_List_node_base11_M_transfer*;
- _ZNSt8__detail2_615_List_node_base4swapER*;
+ _ZNSt8__detail3__715_List_node_base7_M_hook*;
+ _ZNSt8__detail3__715_List_node_base9_M_unhookEv;
+ _ZNSt8__detail3__715_List_node_base10_M_reverseEv;
+ _ZNSt8__detail3__715_List_node_base11_M_transfer*;
+ _ZNSt8__detail3__715_List_node_base4swapER*;
# std::__convert_to_v
- _ZNSt2_614__convert_to_v*;
+ _ZNSt3__714__convert_to_v*;
# std::__copy_streambufs
- _ZNSt2_617__copy_streambufsI*;
- _ZNSt2_621__copy_streambufs_eofI*;
+ _ZNSt3__717__copy_streambufsI*;
+ _ZNSt3__721__copy_streambufs_eofI*;
# __gnu_cxx::__atomic_add
# __gnu_cxx::__exchange_and_add
- _ZN9__gnu_cxx2_612__atomic_addEPV[il][il];
- _ZN9__gnu_cxx2_618__exchange_and_addEPV[li][il];
+ _ZN9__gnu_cxx3__712__atomic_addEPV[il][il];
+ _ZN9__gnu_cxx3__718__exchange_and_addEPV[li][il];
# __gnu_cxx::__pool
- _ZN9__gnu_cxx2_66__poolILb[01]EE13_M_initializeEv;
- _ZN9__gnu_cxx2_66__poolILb[01]EE16_M_reserve_blockE[jm][jm];
- _ZN9__gnu_cxx2_66__poolILb[01]EE16_M_reclaim_blockEPc[jm];
- _ZN9__gnu_cxx2_66__poolILb[01]EE10_M_destroyEv;
- _ZN9__gnu_cxx2_66__poolILb1EE16_M_get_thread_idEv;
+ _ZN9__gnu_cxx3__76__poolILb[01]EE13_M_initializeEv;
+ _ZN9__gnu_cxx3__76__poolILb[01]EE16_M_reserve_blockE[jm][jm];
+ _ZN9__gnu_cxx3__76__poolILb[01]EE16_M_reclaim_blockEPc[jm];
+ _ZN9__gnu_cxx3__76__poolILb[01]EE10_M_destroyEv;
+ _ZN9__gnu_cxx3__76__poolILb1EE16_M_get_thread_idEv;
- _ZN9__gnu_cxx2_617__pool_alloc_base9_M_refillE[jm];
- _ZN9__gnu_cxx2_617__pool_alloc_base16_M_get_free_listE[jm];
- _ZN9__gnu_cxx2_617__pool_alloc_base12_M_get_mutexEv;
+ _ZN9__gnu_cxx3__717__pool_alloc_base9_M_refillE[jm];
+ _ZN9__gnu_cxx3__717__pool_alloc_base16_M_get_free_listE[jm];
+ _ZN9__gnu_cxx3__717__pool_alloc_base12_M_get_mutexEv;
- _ZN9__gnu_cxx2_69free_list6_M_getE[jm];
- _ZN9__gnu_cxx2_69free_list8_M_clearEv;
+ _ZN9__gnu_cxx3__79free_list6_M_getE[jm];
+ _ZN9__gnu_cxx3__79free_list8_M_clearEv;
# __gnu_cxx::stdio_sync_filebuf
- _ZTVN9__gnu_cxx2_618stdio_sync_filebufI[cw]St2_611char_traitsI[cw]EEE;
- _ZN9__gnu_cxx2_618stdio_sync_filebufI[cw]NSt2_611char_traitsI[cw]EEE[5-9]*;
+ _ZTVN9__gnu_cxx3__718stdio_sync_filebufI[cw]St3__711char_traitsI[cw]EEE;
+ _ZN9__gnu_cxx3__718stdio_sync_filebufI[cw]NSt3__711char_traitsI[cw]EEE[5-9]*;
# debug mode
_ZN11__gnu_debug19_Safe_sequence_base12_M_get_mutexEv;
@@ -212,7 +212,7 @@ CXXABI_2.0 {
_ZSt15_Fnv_hash_bytesPKv*;
# __gnu_cxx::_verbose_terminate_handler()
- _ZN9__gnu_cxx2_627__verbose_terminate_handlerEv;
+ _ZN9__gnu_cxx3__727__verbose_terminate_handlerEv;
# *_type_info classes, ctor and dtor
_ZN10__cxxabiv117__array_type_info*;
diff --git a/gcc-4.6/libstdc++-v3/config/abi/pre/gnu.ver b/gcc-4.6/libstdc++-v3/config/abi/pre/gnu.ver
index 57744a410..3d5ccff4b 100644
--- a/gcc-4.6/libstdc++-v3/config/abi/pre/gnu.ver
+++ b/gcc-4.6/libstdc++-v3/config/abi/pre/gnu.ver
@@ -1279,6 +1279,17 @@ GLIBCXX_3.4.16 {
} GLIBCXX_3.4.15;
+GLIBCXX_3.4.17 {
+
+} GLIBCXX_3.4.16;
+
+GLIBCXX_3.4.18 {
+
+ # operator delete(void*, , unsigned long)
+ _ZdlPv[jmy];
+
+} GLIBCXX_3.4.17;
+
# Symbols in the support library (libsupc++) have their own tag.
CXXABI_1.3 {
diff --git a/gcc-4.6/libstdc++-v3/config/locale/generic/c_locale.cc b/gcc-4.6/libstdc++-v3/config/locale/generic/c_locale.cc
index 7e34fcf32..783bf30ef 100644
--- a/gcc-4.6/libstdc++-v3/config/locale/generic/c_locale.cc
+++ b/gcc-4.6/libstdc++-v3/config/locale/generic/c_locale.cc
@@ -52,8 +52,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
{
// Assumes __s formatted for "C" locale.
char* __old = setlocale(LC_ALL, 0);
- char* __sav = NULL;
- if (__old != NULL)
+ char* __sav = 0;
+ if (__old)
{
const size_t __len = strlen(__old) + 1;
__sav = new char[__len];
@@ -121,8 +121,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
{
// Assumes __s formatted for "C" locale.
char* __old = setlocale(LC_ALL, 0);
- char* __sav = NULL;
- if (__old != NULL)
+ char* __sav = 0;
+ if (__old)
{
const size_t __len = strlen(__old) + 1;
__sav = new char[__len];
@@ -170,8 +170,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
{
// Assumes __s formatted for "C" locale.
char* __old = setlocale(LC_ALL, 0);
- char* __sav = NULL;
- if (__old != NULL)
+ char* __sav = 0;
+ if (__old)
{
const size_t __len = strlen(__old) + 1;
__sav = new char[__len];
diff --git a/gcc-4.6/libstdc++-v3/config/locale/generic/c_locale.h b/gcc-4.6/libstdc++-v3/config/locale/generic/c_locale.h
index 6e6f673ec..fa42918cc 100644
--- a/gcc-4.6/libstdc++-v3/config/locale/generic/c_locale.h
+++ b/gcc-4.6/libstdc++-v3/config/locale/generic/c_locale.h
@@ -60,7 +60,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
{
char* __old = std::setlocale(LC_NUMERIC, 0);
char* __sav = 0;
- if (__old != NULL && __builtin_strcmp(__old, "C"))
+ if (__old && __builtin_strcmp(__old, "C"))
{
const size_t __len = __builtin_strlen(__old) + 1;
__sav = new char[__len];
diff --git a/gcc-4.6/libstdc++-v3/config/locale/generic/time_members.cc b/gcc-4.6/libstdc++-v3/config/locale/generic/time_members.cc
index fb9eb6ec1..724dd26b7 100644
--- a/gcc-4.6/libstdc++-v3/config/locale/generic/time_members.cc
+++ b/gcc-4.6/libstdc++-v3/config/locale/generic/time_members.cc
@@ -45,8 +45,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
const tm* __tm) const throw()
{
char* __old = setlocale(LC_ALL, 0);
- char* __sav = NULL;
- if (__old != NULL)
+ char* __sav = 0;
+ if (__old)
{
const size_t __llen = strlen(__old) + 1;
__sav = new char[__llen];
@@ -134,8 +134,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
const tm* __tm) const throw()
{
char* __old = setlocale(LC_ALL, 0);
- char* __sav = NULL;
- if (__old != NULL)
+ char* __sav = 0;
+ if (__old)
{
const size_t __llen = strlen(__old) + 1;
__sav = new char[__llen];
diff --git a/gcc-4.6/libstdc++-v3/configure b/gcc-4.6/libstdc++-v3/configure
index a68accae8..9aedd4fb7 100755
--- a/gcc-4.6/libstdc++-v3/configure
+++ b/gcc-4.6/libstdc++-v3/configure
@@ -644,6 +644,7 @@ GLIBCXX_LDBL_COMPAT_FALSE
GLIBCXX_LDBL_COMPAT_TRUE
ENABLE_VISIBILITY_FALSE
ENABLE_VISIBILITY_TRUE
+libtool_VERSION
ENABLE_SYMVERS_SOL2_FALSE
ENABLE_SYMVERS_SOL2_TRUE
ENABLE_SYMVERS_SUN_FALSE
@@ -787,7 +788,6 @@ build_vendor
build_cpu
build
multi_basedir
-libtool_VERSION
target_alias
host_alias
build_alias
@@ -2824,10 +2824,6 @@ ac_config_headers="$ac_config_headers config.h"
# exported. Only used at the end of this file.
### am handles this now? ORIGINAL_LD_FOR_MULTILIBS=$LD
-# For libtool versioning info, format is CURRENT:REVISION:AGE
-libtool_VERSION=6:16:0
-
-
# Find the rest of the source tree framework.
# Default to --enable-multilib
# Check whether --enable-multilib was given.
@@ -9717,7 +9713,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
;;
# Unfortunately, older versions of FreeBSD 2 do not have this feature.
- freebsd2*)
+ freebsd2.*)
archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
hardcode_direct=yes
hardcode_minus_L=yes
@@ -10633,7 +10629,7 @@ freebsd* | dragonfly*)
objformat=`/usr/bin/objformat`
else
case $host_os in
- freebsd[123]*) objformat=aout ;;
+ freebsd[23].*) objformat=aout ;;
*) objformat=elf ;;
esac
fi
@@ -10651,7 +10647,7 @@ freebsd* | dragonfly*)
esac
shlibpath_var=LD_LIBRARY_PATH
case $host_os in
- freebsd2*)
+ freebsd2.*)
shlibpath_overrides_runpath=yes
;;
freebsd3.[01]* | freebsdelf3.[01]*)
@@ -11503,7 +11499,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 11506 "configure"
+#line 11502 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -11609,7 +11605,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 11612 "configure"
+#line 11608 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -12541,7 +12537,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
esac
;;
- freebsd[12]*)
+ freebsd2.*)
# C++ shared libraries reported to be fairly broken before
# switch to ELF
ld_shlibs_CXX=no
@@ -14316,7 +14312,7 @@ freebsd* | dragonfly*)
objformat=`/usr/bin/objformat`
else
case $host_os in
- freebsd[123]*) objformat=aout ;;
+ freebsd[23].*) objformat=aout ;;
*) objformat=elf ;;
esac
fi
@@ -14334,7 +14330,7 @@ freebsd* | dragonfly*)
esac
shlibpath_var=LD_LIBRARY_PATH
case $host_os in
- freebsd2*)
+ freebsd2.*)
shlibpath_overrides_runpath=yes
;;
freebsd3.[01]* | freebsdelf3.[01]*)
@@ -14967,7 +14963,7 @@ fi
#
# Fake what AC_TRY_COMPILE does. XXX Look at redoing this new-style.
cat > conftest.$ac_ext << EOF
-#line 14970 "configure"
+#line 14966 "configure"
struct S { ~S(); };
void bar();
void foo()
@@ -15335,7 +15331,7 @@ $as_echo "$glibcxx_cv_atomic_long_long" >&6; }
# Fake what AC_TRY_COMPILE does.
cat > conftest.$ac_ext << EOF
-#line 15338 "configure"
+#line 15334 "configure"
int main()
{
typedef bool atomic_type;
@@ -15372,7 +15368,7 @@ $as_echo "$glibcxx_cv_atomic_bool" >&6; }
rm -f conftest*
cat > conftest.$ac_ext << EOF
-#line 15375 "configure"
+#line 15371 "configure"
int main()
{
typedef short atomic_type;
@@ -15409,7 +15405,7 @@ $as_echo "$glibcxx_cv_atomic_short" >&6; }
rm -f conftest*
cat > conftest.$ac_ext << EOF
-#line 15412 "configure"
+#line 15408 "configure"
int main()
{
// NB: _Atomic_word not necessarily int.
@@ -15447,7 +15443,7 @@ $as_echo "$glibcxx_cv_atomic_int" >&6; }
rm -f conftest*
cat > conftest.$ac_ext << EOF
-#line 15450 "configure"
+#line 15446 "configure"
int main()
{
typedef long long atomic_type;
@@ -15523,7 +15519,7 @@ $as_echo "$as_me: WARNING: Performance of certain classes will degrade as a resu
# unnecessary for this test.
cat > conftest.$ac_ext << EOF
-#line 15526 "configure"
+#line 15522 "configure"
int main()
{
_Decimal32 d1;
@@ -64282,7 +64278,10 @@ $as_echo "$as_me: WARNING: === Symbol versioning will be disabled." >&2;}
fi
fi
-# Everything parsed; figure out what file to use.
+# For libtool versioning info, format is CURRENT:REVISION:AGE
+libtool_VERSION=6:16:0
+
+# Everything parsed; figure out what files and settings to use.
case $enable_symvers in
no)
SYMVER_FILE=config/abi/pre/none.ver
@@ -64294,6 +64293,7 @@ $as_echo "#define _GLIBCXX_SYMVER_GNU 1" >>confdefs.h
;;
gnu-versioned-namespace)
+ libtool_VERSION=7:0:0
SYMVER_FILE=config/abi/pre/gnu-versioned-namespace.ver
$as_echo "#define _GLIBCXX_SYMVER_GNU_NAMESPACE 1" >>confdefs.h
@@ -64444,6 +64444,8 @@ fi
$as_echo "$glibcxx_ptrdiff_t_is_i" >&6; }
+
+
# Check whether --enable-visibility was given.
if test "${enable_visibility+set}" = set; then :
enableval=$enable_visibility;
diff --git a/gcc-4.6/libstdc++-v3/configure.ac b/gcc-4.6/libstdc++-v3/configure.ac
index ccf12306d..cc4c9bf2d 100644
--- a/gcc-4.6/libstdc++-v3/configure.ac
+++ b/gcc-4.6/libstdc++-v3/configure.ac
@@ -11,10 +11,6 @@ AC_CONFIG_HEADER(config.h)
# exported. Only used at the end of this file.
### am handles this now? ORIGINAL_LD_FOR_MULTILIBS=$LD
-# For libtool versioning info, format is CURRENT:REVISION:AGE
-libtool_VERSION=6:16:0
-AC_SUBST(libtool_VERSION)
-
# Find the rest of the source tree framework.
AM_ENABLE_MULTILIB(, ..)
@@ -303,6 +299,8 @@ GCC_HEADER_STDINT(include/gstdint.h)
# This depends on GLIBCXX CHECK_LINKER_FEATURES, but without it assumes no.
GLIBCXX_ENABLE_SYMVERS([yes])
+AC_SUBST(libtool_VERSION)
+
GLIBCXX_ENABLE_VISIBILITY([yes])
ac_ldbl_compat=no
diff --git a/gcc-4.6/libstdc++-v3/include/backward/hashtable.h b/gcc-4.6/libstdc++-v3/include/backward/hashtable.h
index c3eefccdc..e04d8faa4 100644
--- a/gcc-4.6/libstdc++-v3/include/backward/hashtable.h
+++ b/gcc-4.6/libstdc++-v3/include/backward/hashtable.h
@@ -210,7 +210,17 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
// Note: assumes long is at least 32 bits.
enum { _S_num_primes = 29 };
- static const unsigned long __stl_prime_list[_S_num_primes] =
+ template<typename _PrimeType>
+ struct _Hashtable_prime_list
+ {
+ static const _PrimeType __stl_prime_list[_S_num_primes];
+
+ static const _PrimeType*
+ _S_get_prime_list();
+ };
+
+ template<typename _PrimeType> const _PrimeType
+ _Hashtable_prime_list<_PrimeType>::__stl_prime_list[_S_num_primes] =
{
5ul, 53ul, 97ul, 193ul, 389ul,
769ul, 1543ul, 3079ul, 6151ul, 12289ul,
@@ -220,11 +230,17 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
805306457ul, 1610612741ul, 3221225473ul, 4294967291ul
};
+ template<class _PrimeType> inline const _PrimeType*
+ _Hashtable_prime_list<_PrimeType>::_S_get_prime_list()
+ {
+ return __stl_prime_list;
+ }
+
inline unsigned long
__stl_next_prime(unsigned long __n)
{
- const unsigned long* __first = __stl_prime_list;
- const unsigned long* __last = __stl_prime_list + (int)_S_num_primes;
+ const unsigned long* __first = _Hashtable_prime_list<unsigned long>::_S_get_prime_list();
+ const unsigned long* __last = __first + (int)_S_num_primes;
const unsigned long* pos = std::lower_bound(__first, __last, __n);
return pos == __last ? *(__last - 1) : *pos;
}
@@ -418,7 +434,9 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
size_type
max_bucket_count() const
- { return __stl_prime_list[(int)_S_num_primes - 1]; }
+ { return _Hashtable_prime_list<unsigned long>::
+ _S_get_prime_list()[(int)_S_num_primes - 1];
+ }
size_type
elems_in_bucket(size_type __bucket) const
diff --git a/gcc-4.6/libstdc++-v3/include/bits/basic_string.h b/gcc-4.6/libstdc++-v3/include/bits/basic_string.h
index 102ef77a6..2f708b7a8 100644
--- a/gcc-4.6/libstdc++-v3/include/bits/basic_string.h
+++ b/gcc-4.6/libstdc++-v3/include/bits/basic_string.h
@@ -2986,7 +2986,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
: public __hash_base<size_t, string>
{
size_t
- operator()(const string& __s) const
+ operator()(const string& __s) const noexcept
{ return std::_Hash_impl::hash(__s.data(), __s.length()); }
};
@@ -2997,7 +2997,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
: public __hash_base<size_t, wstring>
{
size_t
- operator()(const wstring& __s) const
+ operator()(const wstring& __s) const noexcept
{ return std::_Hash_impl::hash(__s.data(),
__s.length() * sizeof(wchar_t)); }
};
@@ -3011,7 +3011,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
: public __hash_base<size_t, u16string>
{
size_t
- operator()(const u16string& __s) const
+ operator()(const u16string& __s) const noexcept
{ return std::_Hash_impl::hash(__s.data(),
__s.length() * sizeof(char16_t)); }
};
@@ -3022,7 +3022,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
: public __hash_base<size_t, u32string>
{
size_t
- operator()(const u32string& __s) const
+ operator()(const u32string& __s) const noexcept
{ return std::_Hash_impl::hash(__s.data(),
__s.length() * sizeof(char32_t)); }
};
diff --git a/gcc-4.6/libstdc++-v3/include/bits/c++0x_warning.h b/gcc-4.6/libstdc++-v3/include/bits/c++0x_warning.h
index 0685a50e6..eb072d00a 100644
--- a/gcc-4.6/libstdc++-v3/include/bits/c++0x_warning.h
+++ b/gcc-4.6/libstdc++-v3/include/bits/c++0x_warning.h
@@ -29,9 +29,9 @@
#define _CXX0X_WARNING_H 1
#ifndef __GXX_EXPERIMENTAL_CXX0X__
-#error This file requires compiler and library support for the upcoming \
-ISO C++ standard, C++0x. This support is currently experimental, and must be \
-enabled with the -std=c++0x or -std=gnu++0x compiler options.
+#error This file requires compiler and library support for the \
+ISO C++ 2011 standard. This support is currently experimental, and must be \
+enabled with the -std=c++11 or -std=gnu++11 compiler options.
#endif
#endif
diff --git a/gcc-4.6/libstdc++-v3/include/bits/c++config b/gcc-4.6/libstdc++-v3/include/bits/c++config
index 8ac3c159d..fce52475f 100644
--- a/gcc-4.6/libstdc++-v3/include/bits/c++config
+++ b/gcc-4.6/libstdc++-v3/include/bits/c++config
@@ -162,41 +162,42 @@ namespace std
// Defined if inline namespaces are used for versioning.
-#define _GLIBCXX_INLINE_VERSION
+#define _GLIBCXX_INLINE_VERSION
// Inline namespace for symbol versioning.
#if _GLIBCXX_INLINE_VERSION
+
namespace std
{
- inline namespace _6 { }
+ inline namespace __7 { }
- namespace rel_ops { inline namespace _6 { } }
+ namespace rel_ops { inline namespace __7 { } }
namespace tr1
{
- inline namespace _6 { }
- namespace placeholders { inline namespace _6 { } }
- namespace regex_constants { inline namespace _6 { } }
- namespace __detail { inline namespace _6 { } }
+ inline namespace __7 { }
+ namespace placeholders { inline namespace __7 { } }
+ namespace regex_constants { inline namespace __7 { } }
+ namespace __detail { inline namespace __7 { } }
}
- namespace decimal { inline namespace _6 { } }
+ namespace decimal { inline namespace __7 { } }
- namespace chrono { inline namespace _6 { } }
- namespace placeholders { inline namespace _6 { } }
- namespace regex_constants { inline namespace _6 { } }
- namespace this_thread { inline namespace _6 { } }
+ namespace chrono { inline namespace __7 { } }
+ namespace placeholders { inline namespace __7 { } }
+ namespace regex_constants { inline namespace __7 { } }
+ namespace this_thread { inline namespace __7 { } }
- namespace __detail { inline namespace _6 { } }
- namespace __regex { inline namespace _6 { } }
+ namespace __detail { inline namespace __7 { } }
+ namespace __regex { inline namespace __7 { } }
}
namespace __gnu_cxx
{
- inline namespace _6 { }
- namespace __detail { inline namespace _6 { } }
+ inline namespace __7 { }
+ namespace __detail { inline namespace __7 { } }
}
-# define _GLIBCXX_BEGIN_NAMESPACE_VERSION namespace _6 {
+# define _GLIBCXX_BEGIN_NAMESPACE_VERSION namespace __7 {
# define _GLIBCXX_END_NAMESPACE_VERSION }
#else
# define _GLIBCXX_BEGIN_NAMESPACE_VERSION
@@ -213,7 +214,7 @@ namespace std
namespace __cxx1998
{
#if _GLIBCXX_INLINE_VERSION
- inline namespace _6 { }
+ inline namespace __7 { }
#endif
}
diff --git a/gcc-4.6/libstdc++-v3/include/bits/deque.tcc b/gcc-4.6/libstdc++-v3/include/bits/deque.tcc
index 389fc80d9..638102274 100644
--- a/gcc-4.6/libstdc++-v3/include/bits/deque.tcc
+++ b/gcc-4.6/libstdc++-v3/include/bits/deque.tcc
@@ -218,7 +218,9 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
deque<_Tp, _Alloc>::
erase(iterator __first, iterator __last)
{
- if (__first == begin() && __last == end())
+ if (__first == __last)
+ return __first;
+ else if (__first == begin() && __last == end())
{
clear();
return end();
diff --git a/gcc-4.6/libstdc++-v3/include/bits/functional_hash.h b/gcc-4.6/libstdc++-v3/include/bits/functional_hash.h
index e77cb4e17..e892159d4 100644
--- a/gcc-4.6/libstdc++-v3/include/bits/functional_hash.h
+++ b/gcc-4.6/libstdc++-v3/include/bits/functional_hash.h
@@ -57,8 +57,9 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
template<typename _Tp>
struct hash : public __hash_base<size_t, _Tp>
{
- size_t
- operator()(_Tp __val) const;
+ static_assert(sizeof(_Tp) < 0,
+ "std::hash is not specialized for this type");
+ size_t operator()(const _Tp&) const noexcept;
};
/// Partial specializations for pointer types.
@@ -66,61 +67,64 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
struct hash<_Tp*> : public __hash_base<size_t, _Tp*>
{
size_t
- operator()(_Tp* __p) const
+ operator()(_Tp* __p) const noexcept
{ return reinterpret_cast<size_t>(__p); }
};
// Explicit specializations for integer types.
#define _Cxx_hashtable_define_trivial_hash(_Tp) \
template<> \
- inline size_t \
- hash<_Tp>::operator()(_Tp __val) const \
- { return static_cast<size_t>(__val); }
+ struct hash<_Tp> : public __hash_base<size_t, _Tp> \
+ { \
+ size_t \
+ operator()(_Tp __val) const noexcept \
+ { return static_cast<size_t>(__val); } \
+ };
/// Explicit specialization for bool.
- _Cxx_hashtable_define_trivial_hash(bool);
+ _Cxx_hashtable_define_trivial_hash(bool)
/// Explicit specialization for char.
- _Cxx_hashtable_define_trivial_hash(char);
+ _Cxx_hashtable_define_trivial_hash(char)
/// Explicit specialization for signed char.
- _Cxx_hashtable_define_trivial_hash(signed char);
+ _Cxx_hashtable_define_trivial_hash(signed char)
/// Explicit specialization for unsigned char.
- _Cxx_hashtable_define_trivial_hash(unsigned char);
+ _Cxx_hashtable_define_trivial_hash(unsigned char)
/// Explicit specialization for wchar_t.
- _Cxx_hashtable_define_trivial_hash(wchar_t);
+ _Cxx_hashtable_define_trivial_hash(wchar_t)
/// Explicit specialization for char16_t.
- _Cxx_hashtable_define_trivial_hash(char16_t);
+ _Cxx_hashtable_define_trivial_hash(char16_t)
/// Explicit specialization for char32_t.
- _Cxx_hashtable_define_trivial_hash(char32_t);
+ _Cxx_hashtable_define_trivial_hash(char32_t)
/// Explicit specialization for short.
- _Cxx_hashtable_define_trivial_hash(short);
+ _Cxx_hashtable_define_trivial_hash(short)
/// Explicit specialization for int.
- _Cxx_hashtable_define_trivial_hash(int);
+ _Cxx_hashtable_define_trivial_hash(int)
/// Explicit specialization for long.
- _Cxx_hashtable_define_trivial_hash(long);
+ _Cxx_hashtable_define_trivial_hash(long)
/// Explicit specialization for long long.
- _Cxx_hashtable_define_trivial_hash(long long);
+ _Cxx_hashtable_define_trivial_hash(long long)
/// Explicit specialization for unsigned short.
- _Cxx_hashtable_define_trivial_hash(unsigned short);
+ _Cxx_hashtable_define_trivial_hash(unsigned short)
/// Explicit specialization for unsigned int.
- _Cxx_hashtable_define_trivial_hash(unsigned int);
+ _Cxx_hashtable_define_trivial_hash(unsigned int)
/// Explicit specialization for unsigned long.
- _Cxx_hashtable_define_trivial_hash(unsigned long);
+ _Cxx_hashtable_define_trivial_hash(unsigned long)
/// Explicit specialization for unsigned long long.
- _Cxx_hashtable_define_trivial_hash(unsigned long long);
+ _Cxx_hashtable_define_trivial_hash(unsigned long long)
#undef _Cxx_hashtable_define_trivial_hash
@@ -162,26 +166,36 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
/// Specialization for float.
template<>
- inline size_t
- hash<float>::operator()(float __val) const
+ struct hash<float> : public __hash_base<size_t, float>
{
- // 0 and -0 both hash to zero.
- return __val != 0.0f ? std::_Hash_impl::hash(__val) : 0;
- }
+ size_t
+ operator()(float __val) const noexcept
+ {
+ // 0 and -0 both hash to zero.
+ return __val != 0.0f ? std::_Hash_impl::hash(__val) : 0;
+ }
+ };
/// Specialization for double.
template<>
- inline size_t
- hash<double>::operator()(double __val) const
+ struct hash<double> : public __hash_base<size_t, double>
{
- // 0 and -0 both hash to zero.
- return __val != 0.0 ? std::_Hash_impl::hash(__val) : 0;
- }
+ size_t
+ operator()(double __val) const noexcept
+ {
+ // 0 and -0 both hash to zero.
+ return __val != 0.0 ? std::_Hash_impl::hash(__val) : 0;
+ }
+ };
/// Specialization for long double.
template<>
- _GLIBCXX_PURE size_t
- hash<long double>::operator()(long double __val) const;
+ struct hash<long double>
+ : public __hash_base<size_t, long double>
+ {
+ _GLIBCXX_PURE size_t
+ operator()(long double __val) const noexcept;
+ };
// @} group hashes
diff --git a/gcc-4.6/libstdc++-v3/include/bits/hashtable.h b/gcc-4.6/libstdc++-v3/include/bits/hashtable.h
index f284126e2..8fdcfbfc3 100644
--- a/gcc-4.6/libstdc++-v3/include/bits/hashtable.h
+++ b/gcc-4.6/libstdc++-v3/include/bits/hashtable.h
@@ -440,6 +440,11 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
iterator
erase(const_iterator);
+ // LWG 2059.
+ iterator
+ erase(iterator __it)
+ { return erase(const_iterator(__it)); }
+
size_type
erase(const key_type&);
@@ -683,12 +688,11 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
_M_element_count(__ht._M_element_count),
_M_rehash_policy(__ht._M_rehash_policy)
{
- size_type __n_bkt = __ht._M_rehash_policy._M_next_bkt(0);
- __ht._M_buckets = __ht._M_allocate_buckets(__n_bkt);
- __ht._M_bucket_count = __n_bkt;
+ __ht._M_rehash_policy = _RehashPolicy();
+ __ht._M_bucket_count = __ht._M_rehash_policy._M_next_bkt(0);
+ __ht._M_buckets = __ht._M_allocate_buckets(__ht._M_bucket_count);
__ht._M_begin_bucket_index = __ht._M_bucket_count;
__ht._M_element_count = 0;
- __ht._M_rehash_policy = _RehashPolicy();
}
template<typename _Key, typename _Value,
diff --git a/gcc-4.6/libstdc++-v3/include/bits/random.tcc b/gcc-4.6/libstdc++-v3/include/bits/random.tcc
index e81392fa5..b9f6af653 100644
--- a/gcc-4.6/libstdc++-v3/include/bits/random.tcc
+++ b/gcc-4.6/libstdc++-v3/include/bits/random.tcc
@@ -2768,7 +2768,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
_Type __arg = (__begin[__k % __n]
^ __begin[(__k + __p) % __n]
^ __begin[(__k - 1) % __n]);
- _Type __r1 = __arg ^ (__arg << 27);
+ _Type __r1 = __arg ^ (__arg >> 27);
__r1 = __detail::__mod<_Type, __detail::_Shift<_Type, 32>::__value,
1664525u, 0u>(__r1);
_Type __r2 = __r1;
@@ -2790,14 +2790,14 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
_Type __arg = (__begin[__k % __n]
+ __begin[(__k + __p) % __n]
+ __begin[(__k - 1) % __n]);
- _Type __r3 = __arg ^ (__arg << 27);
+ _Type __r3 = __arg ^ (__arg >> 27);
__r3 = __detail::__mod<_Type, __detail::_Shift<_Type, 32>::__value,
1566083941u, 0u>(__r3);
_Type __r4 = __r3 - __k % __n;
__r4 = __detail::__mod<_Type,
__detail::_Shift<_Type, 32>::__value>(__r4);
- __begin[(__k + __p) % __n] ^= __r4;
- __begin[(__k + __q) % __n] ^= __r3;
+ __begin[(__k + __p) % __n] ^= __r3;
+ __begin[(__k + __q) % __n] ^= __r4;
__begin[__k % __n] = __r4;
}
}
diff --git a/gcc-4.6/libstdc++-v3/include/bits/regex.h b/gcc-4.6/libstdc++-v3/include/bits/regex.h
index f29ee9139..2bea0c3b7 100644
--- a/gcc-4.6/libstdc++-v3/include/bits/regex.h
+++ b/gcc-4.6/libstdc++-v3/include/bits/regex.h
@@ -2219,7 +2219,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
regex_constants::match_flag_type __flags
= regex_constants::match_default)
{
- std::string __result;
+ basic_string<_Ch_type> __result;
regex_replace(std::back_inserter(__result),
__s.begin(), __s.end(), __e, __fmt, __flags);
return __result;
diff --git a/gcc-4.6/libstdc++-v3/include/bits/shared_ptr.h b/gcc-4.6/libstdc++-v3/include/bits/shared_ptr.h
index 97d123f94..81ac382a2 100644
--- a/gcc-4.6/libstdc++-v3/include/bits/shared_ptr.h
+++ b/gcc-4.6/libstdc++-v3/include/bits/shared_ptr.h
@@ -100,6 +100,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
constexpr shared_ptr()
: __shared_ptr<_Tp>() { }
+ shared_ptr(const shared_ptr&) = default; // never throws
+
/**
* @brief Construct a %shared_ptr that owns the pointer @a __p.
* @param __p A pointer that is convertible to element_type*.
@@ -264,6 +266,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
constexpr shared_ptr(nullptr_t __p)
: __shared_ptr<_Tp>(__p) { }
+ shared_ptr& operator=(const shared_ptr&) = default;
+
template<typename _Tp1>
shared_ptr&
operator=(const shared_ptr<_Tp1>& __r) // never throws
@@ -543,8 +547,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
make_shared(_Args&&... __args)
{
typedef typename std::remove_const<_Tp>::type _Tp_nc;
- return allocate_shared<_Tp>(std::allocator<_Tp_nc>(),
- std::forward<_Args>(__args)...);
+ return std::allocate_shared<_Tp>(std::allocator<_Tp_nc>(),
+ std::forward<_Args>(__args)...);
}
/// std::hash specialization for shared_ptr.
@@ -553,7 +557,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
: public std::unary_function<shared_ptr<_Tp>, size_t>
{
size_t
- operator()(const shared_ptr<_Tp>& __s) const
+ operator()(const shared_ptr<_Tp>& __s) const noexcept
{ return std::hash<_Tp*>()(__s.get()); }
};
diff --git a/gcc-4.6/libstdc++-v3/include/bits/shared_ptr_base.h b/gcc-4.6/libstdc++-v3/include/bits/shared_ptr_base.h
index 72bc4f046..7badc39cb 100644
--- a/gcc-4.6/libstdc++-v3/include/bits/shared_ptr_base.h
+++ b/gcc-4.6/libstdc++-v3/include/bits/shared_ptr_base.h
@@ -799,7 +799,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
: _M_ptr(__p), _M_refcount(__r._M_refcount) // never throws
{ }
- // generated copy constructor, assignment, destructor are fine.
+ __shared_ptr(const __shared_ptr&) = default; // never throws
+ __shared_ptr& operator=(const __shared_ptr&) = default; // never throws
template<typename _Tp1, typename = typename
std::enable_if<std::is_convertible<_Tp1*, _Tp*>::value>::type>
@@ -1365,8 +1366,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
__make_shared(_Args&&... __args)
{
typedef typename std::remove_const<_Tp>::type _Tp_nc;
- return __allocate_shared<_Tp, _Lp>(std::allocator<_Tp_nc>(),
- std::forward<_Args>(__args)...);
+ return std::__allocate_shared<_Tp, _Lp>(std::allocator<_Tp_nc>(),
+ std::forward<_Args>(__args)...);
}
/// std::hash specialization for __shared_ptr.
@@ -1375,7 +1376,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
: public std::unary_function<__shared_ptr<_Tp, _Lp>, size_t>
{
size_t
- operator()(const __shared_ptr<_Tp, _Lp>& __s) const
+ operator()(const __shared_ptr<_Tp, _Lp>& __s) const noexcept
{ return std::hash<_Tp*>()(__s.get()); }
};
diff --git a/gcc-4.6/libstdc++-v3/include/bits/stl_algo.h b/gcc-4.6/libstdc++-v3/include/bits/stl_algo.h
index 6c2be06f1..1d6026a68 100644
--- a/gcc-4.6/libstdc++-v3/include/bits/stl_algo.h
+++ b/gcc-4.6/libstdc++-v3/include/bits/stl_algo.h
@@ -2751,20 +2751,76 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
// merge
- /// This is a helper function for the merge routines.
+ /// This is a helper function for the __merge_adaptive routines.
+ template<typename _InputIterator1, typename _InputIterator2,
+ typename _OutputIterator>
+ void
+ __move_merge_adaptive(_InputIterator1 __first1, _InputIterator1 __last1,
+ _InputIterator2 __first2, _InputIterator2 __last2,
+ _OutputIterator __result)
+ {
+ while (__first1 != __last1 && __first2 != __last2)
+ {
+ if (*__first2 < *__first1)
+ {
+ *__result = _GLIBCXX_MOVE(*__first2);
+ ++__first2;
+ }
+ else
+ {
+ *__result = _GLIBCXX_MOVE(*__first1);
+ ++__first1;
+ }
+ ++__result;
+ }
+ if (__first1 != __last1)
+ _GLIBCXX_MOVE3(__first1, __last1, __result);
+ }
+
+ /// This is a helper function for the __merge_adaptive routines.
+ template<typename _InputIterator1, typename _InputIterator2,
+ typename _OutputIterator, typename _Compare>
+ void
+ __move_merge_adaptive(_InputIterator1 __first1, _InputIterator1 __last1,
+ _InputIterator2 __first2, _InputIterator2 __last2,
+ _OutputIterator __result, _Compare __comp)
+ {
+ while (__first1 != __last1 && __first2 != __last2)
+ {
+ if (__comp(*__first2, *__first1))
+ {
+ *__result = _GLIBCXX_MOVE(*__first2);
+ ++__first2;
+ }
+ else
+ {
+ *__result = _GLIBCXX_MOVE(*__first1);
+ ++__first1;
+ }
+ ++__result;
+ }
+ if (__first1 != __last1)
+ _GLIBCXX_MOVE3(__first1, __last1, __result);
+ }
+
+ /// This is a helper function for the __merge_adaptive routines.
template<typename _BidirectionalIterator1, typename _BidirectionalIterator2,
typename _BidirectionalIterator3>
- _BidirectionalIterator3
- __move_merge_backward(_BidirectionalIterator1 __first1,
- _BidirectionalIterator1 __last1,
- _BidirectionalIterator2 __first2,
- _BidirectionalIterator2 __last2,
- _BidirectionalIterator3 __result)
+ void
+ __move_merge_adaptive_backward(_BidirectionalIterator1 __first1,
+ _BidirectionalIterator1 __last1,
+ _BidirectionalIterator2 __first2,
+ _BidirectionalIterator2 __last2,
+ _BidirectionalIterator3 __result)
{
if (__first1 == __last1)
- return _GLIBCXX_MOVE_BACKWARD3(__first2, __last2, __result);
- if (__first2 == __last2)
- return _GLIBCXX_MOVE_BACKWARD3(__first1, __last1, __result);
+ {
+ _GLIBCXX_MOVE_BACKWARD3(__first2, __last2, __result);
+ return;
+ }
+ else if (__first2 == __last2)
+ return;
+
--__last1;
--__last2;
while (true)
@@ -2773,34 +2829,41 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
{
*--__result = _GLIBCXX_MOVE(*__last1);
if (__first1 == __last1)
- return _GLIBCXX_MOVE_BACKWARD3(__first2, ++__last2, __result);
+ {
+ _GLIBCXX_MOVE_BACKWARD3(__first2, ++__last2, __result);
+ return;
+ }
--__last1;
}
else
{
*--__result = _GLIBCXX_MOVE(*__last2);
if (__first2 == __last2)
- return _GLIBCXX_MOVE_BACKWARD3(__first1, ++__last1, __result);
+ return;
--__last2;
}
}
}
- /// This is a helper function for the merge routines.
+ /// This is a helper function for the __merge_adaptive routines.
template<typename _BidirectionalIterator1, typename _BidirectionalIterator2,
typename _BidirectionalIterator3, typename _Compare>
- _BidirectionalIterator3
- __move_merge_backward(_BidirectionalIterator1 __first1,
- _BidirectionalIterator1 __last1,
- _BidirectionalIterator2 __first2,
- _BidirectionalIterator2 __last2,
- _BidirectionalIterator3 __result,
- _Compare __comp)
+ void
+ __move_merge_adaptive_backward(_BidirectionalIterator1 __first1,
+ _BidirectionalIterator1 __last1,
+ _BidirectionalIterator2 __first2,
+ _BidirectionalIterator2 __last2,
+ _BidirectionalIterator3 __result,
+ _Compare __comp)
{
if (__first1 == __last1)
- return _GLIBCXX_MOVE_BACKWARD3(__first2, __last2, __result);
- if (__first2 == __last2)
- return _GLIBCXX_MOVE_BACKWARD3(__first1, __last1, __result);
+ {
+ _GLIBCXX_MOVE_BACKWARD3(__first2, __last2, __result);
+ return;
+ }
+ else if (__first2 == __last2)
+ return;
+
--__last1;
--__last2;
while (true)
@@ -2809,75 +2872,23 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
{
*--__result = _GLIBCXX_MOVE(*__last1);
if (__first1 == __last1)
- return _GLIBCXX_MOVE_BACKWARD3(__first2, ++__last2, __result);
+ {
+ _GLIBCXX_MOVE_BACKWARD3(__first2, ++__last2, __result);
+ return;
+ }
--__last1;
}
else
{
*--__result = _GLIBCXX_MOVE(*__last2);
if (__first2 == __last2)
- return _GLIBCXX_MOVE_BACKWARD3(__first1, ++__last1, __result);
+ return;
--__last2;
}
}
}
/// This is a helper function for the merge routines.
- template<typename _InputIterator1, typename _InputIterator2,
- typename _OutputIterator>
- _OutputIterator
- __move_merge(_InputIterator1 __first1, _InputIterator1 __last1,
- _InputIterator2 __first2, _InputIterator2 __last2,
- _OutputIterator __result)
- {
- while (__first1 != __last1 && __first2 != __last2)
- {
- if (*__first2 < *__first1)
- {
- *__result = _GLIBCXX_MOVE(*__first2);
- ++__first2;
- }
- else
- {
- *__result = _GLIBCXX_MOVE(*__first1);
- ++__first1;
- }
- ++__result;
- }
- return _GLIBCXX_MOVE3(__first2, __last2,
- _GLIBCXX_MOVE3(__first1, __last1,
- __result));
- }
-
- /// This is a helper function for the merge routines.
- template<typename _InputIterator1, typename _InputIterator2,
- typename _OutputIterator, typename _Compare>
- _OutputIterator
- __move_merge(_InputIterator1 __first1, _InputIterator1 __last1,
- _InputIterator2 __first2, _InputIterator2 __last2,
- _OutputIterator __result, _Compare __comp)
- {
- while (__first1 != __last1 && __first2 != __last2)
- {
- if (__comp(*__first2, *__first1))
- {
- *__result = _GLIBCXX_MOVE(*__first2);
- ++__first2;
- }
- else
- {
- *__result = _GLIBCXX_MOVE(*__first1);
- ++__first1;
- }
- ++__result;
- }
- return _GLIBCXX_MOVE3(__first2, __last2,
- _GLIBCXX_MOVE3(__first1, __last1,
- __result));
- }
-
-
- /// This is a helper function for the merge routines.
template<typename _BidirectionalIterator1, typename _BidirectionalIterator2,
typename _Distance>
_BidirectionalIterator1
@@ -2891,15 +2902,25 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
_BidirectionalIterator2 __buffer_end;
if (__len1 > __len2 && __len2 <= __buffer_size)
{
- __buffer_end = _GLIBCXX_MOVE3(__middle, __last, __buffer);
- _GLIBCXX_MOVE_BACKWARD3(__first, __middle, __last);
- return _GLIBCXX_MOVE3(__buffer, __buffer_end, __first);
+ if (__len2)
+ {
+ __buffer_end = _GLIBCXX_MOVE3(__middle, __last, __buffer);
+ _GLIBCXX_MOVE_BACKWARD3(__first, __middle, __last);
+ return _GLIBCXX_MOVE3(__buffer, __buffer_end, __first);
+ }
+ else
+ return __first;
}
else if (__len1 <= __buffer_size)
{
- __buffer_end = _GLIBCXX_MOVE3(__first, __middle, __buffer);
- _GLIBCXX_MOVE3(__middle, __last, __first);
- return _GLIBCXX_MOVE_BACKWARD3(__buffer, __buffer_end, __last);
+ if (__len1)
+ {
+ __buffer_end = _GLIBCXX_MOVE3(__first, __middle, __buffer);
+ _GLIBCXX_MOVE3(__middle, __last, __first);
+ return _GLIBCXX_MOVE_BACKWARD3(__buffer, __buffer_end, __last);
+ }
+ else
+ return __last;
}
else
{
@@ -2922,13 +2943,14 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
if (__len1 <= __len2 && __len1 <= __buffer_size)
{
_Pointer __buffer_end = _GLIBCXX_MOVE3(__first, __middle, __buffer);
- std::__move_merge(__buffer, __buffer_end, __middle, __last, __first);
+ std::__move_merge_adaptive(__buffer, __buffer_end, __middle, __last,
+ __first);
}
else if (__len2 <= __buffer_size)
{
_Pointer __buffer_end = _GLIBCXX_MOVE3(__middle, __last, __buffer);
- std::__move_merge_backward(__first, __middle, __buffer,
- __buffer_end, __last);
+ std::__move_merge_adaptive_backward(__first, __middle, __buffer,
+ __buffer_end, __last);
}
else
{
@@ -2978,14 +3000,14 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
if (__len1 <= __len2 && __len1 <= __buffer_size)
{
_Pointer __buffer_end = _GLIBCXX_MOVE3(__first, __middle, __buffer);
- std::__move_merge(__buffer, __buffer_end, __middle, __last,
- __first, __comp);
+ std::__move_merge_adaptive(__buffer, __buffer_end, __middle, __last,
+ __first, __comp);
}
else if (__len2 <= __buffer_size)
{
_Pointer __buffer_end = _GLIBCXX_MOVE3(__middle, __last, __buffer);
- std::__move_merge_backward(__first, __middle, __buffer, __buffer_end,
- __last, __comp);
+ std::__move_merge_adaptive_backward(__first, __middle, __buffer,
+ __buffer_end, __last, __comp);
}
else
{
@@ -3222,6 +3244,61 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
__CheckedCompare(__comp));
}
+
+ /// This is a helper function for the __merge_sort_loop routines.
+ template<typename _InputIterator1, typename _InputIterator2,
+ typename _OutputIterator>
+ _OutputIterator
+ __move_merge(_InputIterator1 __first1, _InputIterator1 __last1,
+ _InputIterator2 __first2, _InputIterator2 __last2,
+ _OutputIterator __result)
+ {
+ while (__first1 != __last1 && __first2 != __last2)
+ {
+ if (*__first2 < *__first1)
+ {
+ *__result = _GLIBCXX_MOVE(*__first2);
+ ++__first2;
+ }
+ else
+ {
+ *__result = _GLIBCXX_MOVE(*__first1);
+ ++__first1;
+ }
+ ++__result;
+ }
+ return _GLIBCXX_MOVE3(__first2, __last2,
+ _GLIBCXX_MOVE3(__first1, __last1,
+ __result));
+ }
+
+ /// This is a helper function for the __merge_sort_loop routines.
+ template<typename _InputIterator1, typename _InputIterator2,
+ typename _OutputIterator, typename _Compare>
+ _OutputIterator
+ __move_merge(_InputIterator1 __first1, _InputIterator1 __last1,
+ _InputIterator2 __first2, _InputIterator2 __last2,
+ _OutputIterator __result, _Compare __comp)
+ {
+ while (__first1 != __last1 && __first2 != __last2)
+ {
+ if (__comp(*__first2, *__first1))
+ {
+ *__result = _GLIBCXX_MOVE(*__first2);
+ ++__first2;
+ }
+ else
+ {
+ *__result = _GLIBCXX_MOVE(*__first1);
+ ++__first1;
+ }
+ ++__result;
+ }
+ return _GLIBCXX_MOVE3(__first2, __last2,
+ _GLIBCXX_MOVE3(__first1, __last1,
+ __result));
+ }
+
template<typename _RandomAccessIterator1, typename _RandomAccessIterator2,
typename _Distance>
void
diff --git a/gcc-4.6/libstdc++-v3/include/bits/stl_algobase.h b/gcc-4.6/libstdc++-v3/include/bits/stl_algobase.h
index 626d5bf1c..aecdcb9c6 100644
--- a/gcc-4.6/libstdc++-v3/include/bits/stl_algobase.h
+++ b/gcc-4.6/libstdc++-v3/include/bits/stl_algobase.h
@@ -641,7 +641,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
* loop count will be known (and therefore a candidate for compiler
* optimizations such as unrolling).
*
- * Result may not be in the range [first,last). Use move instead. Note
+ * Result may not be in the range (first,last]. Use move instead. Note
* that the start of the output range may overlap [first,last).
*/
template<typename _BI1, typename _BI2>
diff --git a/gcc-4.6/libstdc++-v3/include/bits/stl_bvector.h b/gcc-4.6/libstdc++-v3/include/bits/stl_bvector.h
index 3cd53e7fa..5bf10d9f3 100644
--- a/gcc-4.6/libstdc++-v3/include/bits/stl_bvector.h
+++ b/gcc-4.6/libstdc++-v3/include/bits/stl_bvector.h
@@ -821,7 +821,8 @@ template<typename _Alloc>
iterator
erase(iterator __first, iterator __last)
{
- _M_erase_at_end(std::copy(__last, end(), __first));
+ if (__first != __last)
+ _M_erase_at_end(std::copy(__last, end(), __first));
return __first;
}
@@ -1049,7 +1050,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
: public __hash_base<size_t, _GLIBCXX_STD_C::vector<bool, _Alloc>>
{
size_t
- operator()(const _GLIBCXX_STD_C::vector<bool, _Alloc>& __b) const;
+ operator()(const _GLIBCXX_STD_C::vector<bool, _Alloc>&) const noexcept;
};
_GLIBCXX_END_NAMESPACE_VERSION
diff --git a/gcc-4.6/libstdc++-v3/include/bits/stl_map.h b/gcc-4.6/libstdc++-v3/include/bits/stl_map.h
index a84b4b61d..a1bef8b6a 100644
--- a/gcc-4.6/libstdc++-v3/include/bits/stl_map.h
+++ b/gcc-4.6/libstdc++-v3/include/bits/stl_map.h
@@ -612,6 +612,11 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
iterator
erase(const_iterator __position)
{ return _M_t.erase(__position); }
+
+ // LWG 2059.
+ iterator
+ erase(iterator __position)
+ { return _M_t.erase(__position); }
#else
/**
* @brief Erases an element from a %map.
diff --git a/gcc-4.6/libstdc++-v3/include/bits/stl_multimap.h b/gcc-4.6/libstdc++-v3/include/bits/stl_multimap.h
index ca37f359e..02e8f58e9 100644
--- a/gcc-4.6/libstdc++-v3/include/bits/stl_multimap.h
+++ b/gcc-4.6/libstdc++-v3/include/bits/stl_multimap.h
@@ -533,6 +533,11 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
iterator
erase(const_iterator __position)
{ return _M_t.erase(__position); }
+
+ // LWG 2059.
+ iterator
+ erase(iterator __position)
+ { return _M_t.erase(__position); }
#else
/**
* @brief Erases an element from a %multimap.
diff --git a/gcc-4.6/libstdc++-v3/include/bits/stl_numeric.h b/gcc-4.6/libstdc++-v3/include/bits/stl_numeric.h
index 1b6998d97..6cbc6d2fe 100644
--- a/gcc-4.6/libstdc++-v3/include/bits/stl_numeric.h
+++ b/gcc-4.6/libstdc++-v3/include/bits/stl_numeric.h
@@ -222,10 +222,10 @@ _GLIBCXX_BEGIN_NAMESPACE_ALGO
/**
* @brief Return list of partial sums
*
- * Accumulates the values in the range [first,last) using operator+().
+ * Accumulates the values in the range [first,last) using the @c + operator.
* As each successive input value is added into the total, that partial sum
- * is written to @a result. Therefore, the first value in result is the
- * first value of the input, the second value in result is the sum of the
+ * is written to @p result. Therefore, the first value in @p result is the
+ * first value of the input, the second value in @p result is the sum of the
* first and second input values, and so on.
*
* @param first Start of input range.
@@ -261,15 +261,16 @@ _GLIBCXX_BEGIN_NAMESPACE_ALGO
/**
* @brief Return list of partial sums
*
- * Accumulates the values in the range [first,last) using operator+().
+ * Accumulates the values in the range [first,last) using @p binary_op.
* As each successive input value is added into the total, that partial sum
- * is written to @a result. Therefore, the first value in result is the
- * first value of the input, the second value in result is the sum of the
+ * is written to @a result. Therefore, the first value in @p result is the
+ * first value of the input, the second value in @p result is the sum of the
* first and second input values, and so on.
*
* @param first Start of input range.
* @param last End of input range.
* @param result Output to write sums to.
+ * @param binary_op Function object.
* @return Iterator pointing just beyond the values written to result.
*/
template<typename _InputIterator, typename _OutputIterator,
diff --git a/gcc-4.6/libstdc++-v3/include/bits/stl_tree.h b/gcc-4.6/libstdc++-v3/include/bits/stl_tree.h
index 7567e209c..a7e956441 100644
--- a/gcc-4.6/libstdc++-v3/include/bits/stl_tree.h
+++ b/gcc-4.6/libstdc++-v3/include/bits/stl_tree.h
@@ -800,6 +800,16 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
_M_erase_aux(__position);
return __result._M_const_cast();
}
+
+ // LWG 2059.
+ iterator
+ erase(iterator __position)
+ {
+ iterator __result = __position;
+ ++__result;
+ _M_erase_aux(__position);
+ return __result;
+ }
#else
void
erase(iterator __position)
diff --git a/gcc-4.6/libstdc++-v3/include/bits/stl_uninitialized.h b/gcc-4.6/libstdc++-v3/include/bits/stl_uninitialized.h
index f15be3aee..70ce545b8 100644
--- a/gcc-4.6/libstdc++-v3/include/bits/stl_uninitialized.h
+++ b/gcc-4.6/libstdc++-v3/include/bits/stl_uninitialized.h
@@ -1,7 +1,7 @@
// Raw memory manipulators -*- C++ -*-
// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008,
-// 2009, 2010
+// 2009, 2010, 2011
// Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
@@ -530,6 +530,21 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
__uninit_default_n(__first, __n);
}
+ template<typename _Tp, typename _Allocator>
+ inline auto
+ _Construct_default_a_impl(_Tp* __ptr, _Allocator& __alloc, void*)
+ -> decltype(__alloc.construct(__ptr))
+ { return __alloc.construct(__ptr); }
+
+ template<typename _Tp, typename _Allocator>
+ inline void
+ _Construct_default_a_impl(_Tp* __ptr, _Allocator& __alloc, ...)
+ { _Construct(__ptr); }
+
+ template<typename _Tp, typename _Allocator>
+ inline void
+ _Construct_default_a(_Tp* __ptr, _Allocator& __alloc)
+ { _Construct_default_a_impl(__ptr, __alloc, nullptr); }
// __uninitialized_default_a
// Fills [first, last) with std::distance(first, last) default
@@ -544,7 +559,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
__try
{
for (; __cur != __last; ++__cur)
- __alloc.construct(std::__addressof(*__cur));
+ _Construct_default_a(std::__addressof(*__cur), __alloc);
}
__catch(...)
{
@@ -573,7 +588,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
__try
{
for (; __n > 0; --__n, ++__cur)
- __alloc.construct(std::__addressof(*__cur));
+ _Construct_default_a(std::__addressof(*__cur), __alloc);
}
__catch(...)
{
diff --git a/gcc-4.6/libstdc++-v3/include/bits/stl_vector.h b/gcc-4.6/libstdc++-v3/include/bits/stl_vector.h
index 92137b6bd..8b7fdb146 100644
--- a/gcc-4.6/libstdc++-v3/include/bits/stl_vector.h
+++ b/gcc-4.6/libstdc++-v3/include/bits/stl_vector.h
@@ -208,6 +208,16 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
using _Base::_M_impl;
using _Base::_M_get_Tp_allocator;
+ bool _M_is_valid() const
+ {
+ return (this->_M_impl._M_end_of_storage == 0
+ && this->_M_impl._M_start == 0
+ && this->_M_impl._M_finish == 0)
+ || (this->_M_impl._M_start <= this->_M_impl._M_finish
+ && this->_M_impl._M_finish <= this->_M_impl._M_end_of_storage
+ && this->_M_impl._M_start < this->_M_impl._M_end_of_storage);
+ }
+
public:
// [23.2.4.1] construct/copy/destroy
// (assign() and get_allocator() are also listed in this section)
@@ -461,7 +471,13 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
*/
iterator
begin()
- { return iterator(this->_M_impl._M_start); }
+ {
+#if __google_stl_debug_dangling_vector
+ if (!this->_M_is_valid())
+ __throw_logic_error("begin() on corrupt (dangling?) vector");
+#endif
+ return iterator(this->_M_impl._M_start);
+ }
/**
* Returns a read-only (constant) iterator that points to the
@@ -470,7 +486,13 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
*/
const_iterator
begin() const
- { return const_iterator(this->_M_impl._M_start); }
+ {
+#if __google_stl_debug_dangling_vector
+ if (!this->_M_is_valid())
+ __throw_logic_error("begin() on corrupt (dangling?) vector");
+#endif
+ return const_iterator(this->_M_impl._M_start);
+ }
/**
* Returns a read/write iterator that points one past the last
@@ -479,7 +501,13 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
*/
iterator
end()
- { return iterator(this->_M_impl._M_finish); }
+ {
+#if __google_stl_debug_dangling_vector
+ if (!this->_M_is_valid())
+ __throw_logic_error("end() on corrupt (dangling?) vector");
+#endif
+ return iterator(this->_M_impl._M_finish);
+ }
/**
* Returns a read-only (constant) iterator that points one past
@@ -488,7 +516,13 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
*/
const_iterator
end() const
- { return const_iterator(this->_M_impl._M_finish); }
+ {
+#if __google_stl_debug_dangling_vector
+ if (!this->_M_is_valid())
+ __throw_logic_error("end() on corrupt (dangling?) vector");
+#endif
+ return const_iterator(this->_M_impl._M_finish);
+ }
/**
* Returns a read/write reverse iterator that points to the
@@ -568,7 +602,13 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
/** Returns the number of elements in the %vector. */
size_type
size() const
- { return size_type(this->_M_impl._M_finish - this->_M_impl._M_start); }
+ {
+#if __google_stl_debug_dangling_vector
+ if (!this->_M_is_valid())
+ __throw_logic_error("size() on corrupt (dangling?) vector");
+#endif
+ return size_type(this->_M_impl._M_finish - this->_M_impl._M_start);
+ }
/** Returns the size() of the largest possible %vector. */
size_type
@@ -648,7 +688,12 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
*/
size_type
capacity() const
- { return size_type(this->_M_impl._M_end_of_storage
+ {
+#if __google_stl_debug_dangling_vector
+ if (!this->_M_is_valid())
+ __throw_logic_error("capacity() on corrupt (dangling?) vector");
+#endif
+ return size_type(this->_M_impl._M_end_of_storage
- this->_M_impl._M_start); }
/**
@@ -1034,6 +1079,10 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
void
swap(vector& __x)
{
+#if __google_stl_debug_dangling_vector
+ if (!this->_M_is_valid() || !__x._M_is_valid())
+ __throw_logic_error("swap() on corrupt (dangling?) vector");
+#endif
std::swap(this->_M_impl._M_start, __x._M_impl._M_start);
std::swap(this->_M_impl._M_finish, __x._M_impl._M_finish);
std::swap(this->_M_impl._M_end_of_storage,
@@ -1053,7 +1102,13 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
*/
void
clear()
- { _M_erase_at_end(this->_M_impl._M_start); }
+ {
+#if __google_stl_debug_dangling_vector
+ if (!this->_M_is_valid())
+ __throw_logic_error("clear() on corrupt (dangling?) vector");
+#endif
+ _M_erase_at_end(this->_M_impl._M_start);
+ }
protected:
/**
diff --git a/gcc-4.6/libstdc++-v3/include/bits/unique_ptr.h b/gcc-4.6/libstdc++-v3/include/bits/unique_ptr.h
index 9d5d206bb..cb2d86092 100644
--- a/gcc-4.6/libstdc++-v3/include/bits/unique_ptr.h
+++ b/gcc-4.6/libstdc++-v3/include/bits/unique_ptr.h
@@ -496,7 +496,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
: public std::unary_function<unique_ptr<_Tp, _Dp>, size_t>
{
size_t
- operator()(const unique_ptr<_Tp, _Dp>& __u) const
+ operator()(const unique_ptr<_Tp, _Dp>& __u) const noexcept
{
typedef unique_ptr<_Tp, _Dp> _UP;
return std::hash<typename _UP::pointer>()(__u.get());
diff --git a/gcc-4.6/libstdc++-v3/include/bits/vector.tcc b/gcc-4.6/libstdc++-v3/include/bits/vector.tcc
index 3aaee392e..cd23f769f 100644
--- a/gcc-4.6/libstdc++-v3/include/bits/vector.tcc
+++ b/gcc-4.6/libstdc++-v3/include/bits/vector.tcc
@@ -147,9 +147,12 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
vector<_Tp, _Alloc>::
erase(iterator __first, iterator __last)
{
- if (__last != end())
- _GLIBCXX_MOVE3(__last, end(), __first);
- _M_erase_at_end(__first.base() + (end() - __last));
+ if (__first != __last)
+ {
+ if (__last != end())
+ _GLIBCXX_MOVE3(__last, end(), __first);
+ _M_erase_at_end(__first.base() + (end() - __last));
+ }
return __first;
}
@@ -158,6 +161,10 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
vector<_Tp, _Alloc>::
operator=(const vector<_Tp, _Alloc>& __x)
{
+#if __google_stl_debug_dangling_vector
+ if (!this->_M_is_valid() || !__x._M_is_valid())
+ __throw_logic_error("operator=() on corrupt (dangling?) vector");
+#endif
if (&__x != this)
{
const size_type __xlen = __x.size();
@@ -743,7 +750,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
template<typename _Alloc>
size_t
hash<_GLIBCXX_STD_C::vector<bool, _Alloc>>::
- operator()(const _GLIBCXX_STD_C::vector<bool, _Alloc>& __b) const
+ operator()(const _GLIBCXX_STD_C::vector<bool, _Alloc>& __b) const noexcept
{
size_t __hash = 0;
using _GLIBCXX_STD_C::_S_word_bit;
diff --git a/gcc-4.6/libstdc++-v3/include/c_global/cmath b/gcc-4.6/libstdc++-v3/include/c_global/cmath
index e38ab9d6e..6e8cd1372 100644
--- a/gcc-4.6/libstdc++-v3/include/c_global/cmath
+++ b/gcc-4.6/libstdc++-v3/include/c_global/cmath
@@ -156,10 +156,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
template<typename _Tp, typename _Up>
inline
- typename __gnu_cxx::__promote_2<
- typename __gnu_cxx::__enable_if<__is_arithmetic<_Tp>::__value
- && __is_arithmetic<_Up>::__value,
- _Tp>::__type, _Up>::__type
+ typename __gnu_cxx::__promote_2<_Tp, _Up>::__type
atan2(_Tp __y, _Up __x)
{
typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type;
@@ -374,10 +371,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
template<typename _Tp, typename _Up>
inline
- typename __gnu_cxx::__promote_2<
- typename __gnu_cxx::__enable_if<__is_arithmetic<_Tp>::__value
- && __is_arithmetic<_Up>::__value,
- _Tp>::__type, _Up>::__type
+ typename __gnu_cxx::__promote_2<_Tp, _Up>::__type
pow(_Tp __x, _Up __y)
{
typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type;
diff --git a/gcc-4.6/libstdc++-v3/include/c_global/cwchar b/gcc-4.6/libstdc++-v3/include/c_global/cwchar
index 5a3396577..a2b1168f9 100644
--- a/gcc-4.6/libstdc++-v3/include/c_global/cwchar
+++ b/gcc-4.6/libstdc++-v3/include/c_global/cwchar
@@ -136,6 +136,8 @@ namespace std
namespace std _GLIBCXX_VISIBILITY(default)
{
+_GLIBCXX_BEGIN_NAMESPACE_VERSION
+
using ::wint_t;
using ::btowc;
@@ -207,8 +209,6 @@ namespace std _GLIBCXX_VISIBILITY(default)
using ::wcsstr;
using ::wmemchr;
-_GLIBCXX_BEGIN_NAMESPACE_VERSION
-
#ifndef __CORRECT_ISO_CPP_WCHAR_H_PROTO
inline wchar_t*
wcschr(wchar_t* __p, wchar_t __c)
diff --git a/gcc-4.6/libstdc++-v3/include/debug/bitset b/gcc-4.6/libstdc++-v3/include/debug/bitset
index c18754542..09929e7a9 100644
--- a/gcc-4.6/libstdc++-v3/include/debug/bitset
+++ b/gcc-4.6/libstdc++-v3/include/debug/bitset
@@ -409,7 +409,7 @@ namespace __debug
: public __hash_base<size_t, __debug::bitset<_Nb>>
{
size_t
- operator()(const __debug::bitset<_Nb>& __b) const
+ operator()(const __debug::bitset<_Nb>& __b) const noexcept
{ return std::hash<_GLIBCXX_STD_C::bitset<_Nb>>()(__b._M_base()); }
};
#endif
diff --git a/gcc-4.6/libstdc++-v3/include/debug/deque b/gcc-4.6/libstdc++-v3/include/debug/deque
index ee17f2041..fc4d8cb61 100644
--- a/gcc-4.6/libstdc++-v3/include/debug/deque
+++ b/gcc-4.6/libstdc++-v3/include/debug/deque
@@ -460,7 +460,11 @@ namespace __debug
// _GLIBCXX_RESOLVE_LIB_DEFECTS
// 151. can't currently clear() empty container
__glibcxx_check_erase_range(__first, __last);
- if (__first.base() == _Base::begin() || __last.base() == _Base::end())
+
+ if (__first.base() == __last.base())
+ return __first;
+ else if (__first.base() == _Base::begin()
+ || __last.base() == _Base::end())
{
this->_M_detach_singular();
for (_Base_iterator __position = __first.base();
diff --git a/gcc-4.6/libstdc++-v3/include/debug/map.h b/gcc-4.6/libstdc++-v3/include/debug/map.h
index 31085197f..177797d73 100644
--- a/gcc-4.6/libstdc++-v3/include/debug/map.h
+++ b/gcc-4.6/libstdc++-v3/include/debug/map.h
@@ -273,6 +273,10 @@ namespace __debug
this->_M_invalidate_if(_Equal(__position.base()));
return iterator(_Base::erase(__position.base()), this);
}
+
+ iterator
+ erase(iterator __position)
+ { return erase(const_iterator(__position)); }
#else
void
erase(iterator __position)
diff --git a/gcc-4.6/libstdc++-v3/include/debug/multimap.h b/gcc-4.6/libstdc++-v3/include/debug/multimap.h
index 3c22517b2..d2e197699 100644
--- a/gcc-4.6/libstdc++-v3/include/debug/multimap.h
+++ b/gcc-4.6/libstdc++-v3/include/debug/multimap.h
@@ -254,6 +254,10 @@ namespace __debug
this->_M_invalidate_if(_Equal(__position.base()));
return iterator(_Base::erase(__position.base()), this);
}
+
+ iterator
+ erase(iterator __position)
+ { return erase(const_iterator(__position)); }
#else
void
erase(iterator __position)
diff --git a/gcc-4.6/libstdc++-v3/include/debug/unordered_map b/gcc-4.6/libstdc++-v3/include/debug/unordered_map
index 2d7e100c4..43b1e9c29 100644
--- a/gcc-4.6/libstdc++-v3/include/debug/unordered_map
+++ b/gcc-4.6/libstdc++-v3/include/debug/unordered_map
@@ -276,6 +276,10 @@ namespace __debug
}
iterator
+ erase(iterator __it)
+ { return erase(const_iterator(__it)); }
+
+ iterator
erase(const_iterator __first, const_iterator __last)
{
__glibcxx_check_erase_range(__first, __last);
@@ -558,6 +562,10 @@ namespace __debug
}
iterator
+ erase(iterator __it)
+ { return erase(const_iterator(__it)); }
+
+ iterator
erase(const_iterator __first, const_iterator __last)
{
__glibcxx_check_erase_range(__first, __last);
diff --git a/gcc-4.6/libstdc++-v3/include/debug/unordered_set b/gcc-4.6/libstdc++-v3/include/debug/unordered_set
index e30f976d3..cf21a3c15 100644
--- a/gcc-4.6/libstdc++-v3/include/debug/unordered_set
+++ b/gcc-4.6/libstdc++-v3/include/debug/unordered_set
@@ -269,6 +269,10 @@ namespace __debug
}
iterator
+ erase(iterator __it)
+ { return erase(const_iterator(__it)); }
+
+ iterator
erase(const_iterator __first, const_iterator __last)
{
__glibcxx_check_erase_range(__first, __last);
@@ -539,6 +543,10 @@ namespace __debug
}
iterator
+ erase(iterator __it)
+ { return erase(const_iterator(__it)); }
+
+ iterator
erase(const_iterator __first, const_iterator __last)
{
__glibcxx_check_erase_range(__first, __last);
diff --git a/gcc-4.6/libstdc++-v3/include/debug/vector b/gcc-4.6/libstdc++-v3/include/debug/vector
index e2dd71a7e..edb1f88d5 100644
--- a/gcc-4.6/libstdc++-v3/include/debug/vector
+++ b/gcc-4.6/libstdc++-v3/include/debug/vector
@@ -492,11 +492,16 @@ namespace __debug
// 151. can't currently clear() empty container
__glibcxx_check_erase_range(__first, __last);
- difference_type __offset = __first.base() - _Base::begin();
- _Base_iterator __res = _Base::erase(__first.base(),
- __last.base());
- this->_M_invalidate_after_nth(__offset);
- return iterator(__res, this);
+ if (__first.base() != __last.base())
+ {
+ difference_type __offset = __first.base() - _Base::begin();
+ _Base_iterator __res = _Base::erase(__first.base(),
+ __last.base());
+ this->_M_invalidate_after_nth(__offset);
+ return iterator(__res, this);
+ }
+ else
+ return __first;
}
void
@@ -594,7 +599,7 @@ namespace __debug
: public __hash_base<size_t, __debug::vector<bool, _Alloc>>
{
size_t
- operator()(const __debug::vector<bool, _Alloc>& __b) const
+ operator()(const __debug::vector<bool, _Alloc>& __b) const noexcept
{ return std::hash<_GLIBCXX_STD_C::vector<bool, _Alloc>>()
(__b._M_base()); }
};
diff --git a/gcc-4.6/libstdc++-v3/include/ext/type_traits.h b/gcc-4.6/libstdc++-v3/include/ext/type_traits.h
index 92747268a..51db03ec7 100644
--- a/gcc-4.6/libstdc++-v3/include/ext/type_traits.h
+++ b/gcc-4.6/libstdc++-v3/include/ext/type_traits.h
@@ -1,6 +1,7 @@
// -*- C++ -*-
-// Copyright (C) 2005, 2006, 2007, 2009 Free Software Foundation, Inc.
+// Copyright (C) 2005, 2006, 2007, 2009, 2010, 2011
+// 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
@@ -161,44 +162,50 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
struct __promote
{ typedef double __type; };
+ // No nested __type member for non-integer non-floating point types,
+ // allows this type to be used for SFINAE to constrain overloads in
+ // <cmath> and <complex> to only the intended types.
template<typename _Tp>
struct __promote<_Tp, false>
- { typedef _Tp __type; };
+ { };
+
+ template<>
+ struct __promote<long double>
+ { typedef long double __type; };
+
+ template<>
+ struct __promote<double>
+ { typedef double __type; };
+
+ template<>
+ struct __promote<float>
+ { typedef float __type; };
- template<typename _Tp, typename _Up>
+ template<typename _Tp, typename _Up,
+ typename _Tp2 = typename __promote<_Tp>::__type,
+ typename _Up2 = typename __promote<_Up>::__type>
struct __promote_2
{
- private:
- typedef typename __promote<_Tp>::__type __type1;
- typedef typename __promote<_Up>::__type __type2;
-
- public:
- typedef __typeof__(__type1() + __type2()) __type;
+ typedef __typeof__(_Tp2() + _Up2()) __type;
};
- template<typename _Tp, typename _Up, typename _Vp>
+ template<typename _Tp, typename _Up, typename _Vp,
+ typename _Tp2 = typename __promote<_Tp>::__type,
+ typename _Up2 = typename __promote<_Up>::__type,
+ typename _Vp2 = typename __promote<_Vp>::__type>
struct __promote_3
{
- private:
- typedef typename __promote<_Tp>::__type __type1;
- typedef typename __promote<_Up>::__type __type2;
- typedef typename __promote<_Vp>::__type __type3;
-
- public:
- typedef __typeof__(__type1() + __type2() + __type3()) __type;
+ typedef __typeof__(_Tp2() + _Up2() + _Vp2()) __type;
};
- template<typename _Tp, typename _Up, typename _Vp, typename _Wp>
+ template<typename _Tp, typename _Up, typename _Vp, typename _Wp,
+ typename _Tp2 = typename __promote<_Tp>::__type,
+ typename _Up2 = typename __promote<_Up>::__type,
+ typename _Vp2 = typename __promote<_Vp>::__type,
+ typename _Wp2 = typename __promote<_Wp>::__type>
struct __promote_4
{
- private:
- typedef typename __promote<_Tp>::__type __type1;
- typedef typename __promote<_Up>::__type __type2;
- typedef typename __promote<_Vp>::__type __type3;
- typedef typename __promote<_Wp>::__type __type4;
-
- public:
- typedef __typeof__(__type1() + __type2() + __type3() + __type4()) __type;
+ typedef __typeof__(_Tp2() + _Up2() + _Vp2() + _Wp2()) __type;
};
_GLIBCXX_END_NAMESPACE_VERSION
diff --git a/gcc-4.6/libstdc++-v3/include/ext/vstring.h b/gcc-4.6/libstdc++-v3/include/ext/vstring.h
index 57f36a634..19df37573 100644
--- a/gcc-4.6/libstdc++-v3/include/ext/vstring.h
+++ b/gcc-4.6/libstdc++-v3/include/ext/vstring.h
@@ -2760,7 +2760,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
: public __hash_base<size_t, __gnu_cxx::__vstring>
{
size_t
- operator()(const __gnu_cxx::__vstring& __s) const
+ operator()(const __gnu_cxx::__vstring& __s) const noexcept
{ return std::_Hash_impl::hash(__s.data(), __s.length()); }
};
@@ -2771,7 +2771,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
: public __hash_base<size_t, __gnu_cxx::__wvstring>
{
size_t
- operator()(const __gnu_cxx::__wvstring& __s) const
+ operator()(const __gnu_cxx::__wvstring& __s) const noexcept
{ return std::_Hash_impl::hash(__s.data(),
__s.length() * sizeof(wchar_t)); }
};
@@ -2784,7 +2784,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
: public __hash_base<size_t, __gnu_cxx::__u16vstring>
{
size_t
- operator()(const __gnu_cxx::__u16vstring& __s) const
+ operator()(const __gnu_cxx::__u16vstring& __s) const noexcept
{ return std::_Hash_impl::hash(__s.data(),
__s.length() * sizeof(char16_t)); }
};
@@ -2795,7 +2795,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
: public __hash_base<size_t, __gnu_cxx::__u32vstring>
{
size_t
- operator()(const __gnu_cxx::__u32vstring& __s) const
+ operator()(const __gnu_cxx::__u32vstring& __s) const noexcept
{ return std::_Hash_impl::hash(__s.data(),
__s.length() * sizeof(char32_t)); }
};
diff --git a/gcc-4.6/libstdc++-v3/include/parallel/algo.h b/gcc-4.6/libstdc++-v3/include/parallel/algo.h
index 89b7f6d82..b27de9b37 100644
--- a/gcc-4.6/libstdc++-v3/include/parallel/algo.h
+++ b/gcc-4.6/libstdc++-v3/include/parallel/algo.h
@@ -1,6 +1,6 @@
// -*- C++ -*-
-// Copyright (C) 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
+// Copyright (C) 2007, 2008, 2009, 2010, 2011 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
@@ -273,12 +273,12 @@ namespace __parallel
_BinaryPredicate __comp)
{
typedef std::iterator_traits<_IIter> _IIterTraits;
- typedef std::iterator_traits<_FIterator> iteratorf_traits;
+ typedef std::iterator_traits<_FIterator> _FIterTraits;
typedef typename _IIterTraits::iterator_category _IIteratorCategory;
- typedef typename iteratorf_traits::iterator_category iteratorf_category;
+ typedef typename _FIterTraits::iterator_category _FIteratorCategory;
return __find_first_of_switch(__begin1, __end1, __begin2, __end2, __comp,
- _IIteratorCategory(), iteratorf_category());
+ _IIteratorCategory(), _FIteratorCategory());
}
// Public interface, insert default comparator
@@ -288,9 +288,9 @@ namespace __parallel
_FIterator __begin2, _FIterator __end2)
{
typedef std::iterator_traits<_IIter> _IIterTraits;
- typedef std::iterator_traits<_FIterator> iteratorf_traits;
+ typedef std::iterator_traits<_FIterator> _FIterTraits;
typedef typename _IIterTraits::value_type _IValueType;
- typedef typename iteratorf_traits::value_type _FValueType;
+ typedef typename _FIterTraits::value_type _FValueType;
return __gnu_parallel::find_first_of(__begin1, __end1, __begin2, __end2,
__gnu_parallel::_EqualTo<_IValueType, _FValueType>());
diff --git a/gcc-4.6/libstdc++-v3/include/profile/bitset b/gcc-4.6/libstdc++-v3/include/profile/bitset
index a995afa97..381f1eab6 100644
--- a/gcc-4.6/libstdc++-v3/include/profile/bitset
+++ b/gcc-4.6/libstdc++-v3/include/profile/bitset
@@ -367,7 +367,7 @@ namespace __profile
: public __hash_base<size_t, __profile::bitset<_Nb>>
{
size_t
- operator()(const __profile::bitset<_Nb>& __b) const
+ operator()(const __profile::bitset<_Nb>& __b) const noexcept
{ return std::hash<_GLIBCXX_STD_C::bitset<_Nb>>()(__b._M_base()); }
};
#endif
diff --git a/gcc-4.6/libstdc++-v3/include/profile/map.h b/gcc-4.6/libstdc++-v3/include/profile/map.h
index 1edc16c78..a58a2b01a 100644
--- a/gcc-4.6/libstdc++-v3/include/profile/map.h
+++ b/gcc-4.6/libstdc++-v3/include/profile/map.h
@@ -326,6 +326,10 @@ namespace __profile
__profcxx_map_to_unordered_map_erase(this, size(), 1);
return __i;
}
+
+ iterator
+ erase(iterator __position)
+ { return erase(const_iterator(__position)); }
#else
void
erase(iterator __position)
diff --git a/gcc-4.6/libstdc++-v3/include/profile/multimap.h b/gcc-4.6/libstdc++-v3/include/profile/multimap.h
index 76ce805f3..3ee169b24 100644
--- a/gcc-4.6/libstdc++-v3/include/profile/multimap.h
+++ b/gcc-4.6/libstdc++-v3/include/profile/multimap.h
@@ -225,6 +225,10 @@ namespace __profile
iterator
erase(const_iterator __position)
{ return iterator(_Base::erase(__position)); }
+
+ iterator
+ erase(iterator __position)
+ { return iterator(_Base::erase(__position)); }
#else
void
erase(iterator __position)
diff --git a/gcc-4.6/libstdc++-v3/include/profile/vector b/gcc-4.6/libstdc++-v3/include/profile/vector
index f8a9622e8..3e81c0f5b 100644
--- a/gcc-4.6/libstdc++-v3/include/profile/vector
+++ b/gcc-4.6/libstdc++-v3/include/profile/vector
@@ -508,7 +508,7 @@ namespace __profile
: public __hash_base<size_t, __profile::vector<bool, _Alloc>>
{
size_t
- operator()(const __profile::vector<bool, _Alloc>& __b) const
+ operator()(const __profile::vector<bool, _Alloc>& __b) const noexcept
{ return std::hash<_GLIBCXX_STD_C::vector<bool, _Alloc>>()
(__b._M_base()); }
};
diff --git a/gcc-4.6/libstdc++-v3/include/std/bitset b/gcc-4.6/libstdc++-v3/include/std/bitset
index e0e8f1340..ee771bed0 100644
--- a/gcc-4.6/libstdc++-v3/include/std/bitset
+++ b/gcc-4.6/libstdc++-v3/include/std/bitset
@@ -52,11 +52,13 @@
#include <iosfwd>
#include <bits/cxxabi_forced.h>
-#define _GLIBCXX_BITSET_BITS_PER_WORD (__CHAR_BIT__ * sizeof(unsigned long))
+#define _GLIBCXX_BITSET_BITS_PER_WORD (__CHAR_BIT__ * __SIZEOF_LONG__)
#define _GLIBCXX_BITSET_WORDS(__n) \
((__n) / _GLIBCXX_BITSET_BITS_PER_WORD + \
((__n) % _GLIBCXX_BITSET_BITS_PER_WORD == 0 ? 0 : 1))
+#define _GLIBCXX_BITSET_BITS_PER_ULL (__CHAR_BIT__ * __SIZEOF_LONG_LONG__)
+
namespace std _GLIBCXX_VISIBILITY(default)
{
_GLIBCXX_BEGIN_NAMESPACE_CONTAINER
@@ -654,6 +656,24 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
_S_do_sanitize(_WordT) { }
};
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ template<size_t _Nb, bool = _Nb < _GLIBCXX_BITSET_BITS_PER_ULL>
+ struct _Sanitize_val
+ {
+ static constexpr unsigned long long
+ _S_do_sanitize_val(unsigned long long __val)
+ { return __val; }
+ };
+
+ template<size_t _Nb>
+ struct _Sanitize_val<_Nb, true>
+ {
+ static constexpr unsigned long long
+ _S_do_sanitize_val(unsigned long long __val)
+ { return __val & ~((~static_cast<unsigned long long>(0)) << _Nb); }
+ };
+#endif
+
/**
* @brief The %bitset class represents a @e fixed-size sequence of bits.
*
@@ -819,7 +839,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
/// Initial bits bitwise-copied from a single word (others set to zero).
#ifdef __GXX_EXPERIMENTAL_CXX0X__
constexpr bitset(unsigned long long __val)
- : _Base(__val) { }
+ : _Base(_Sanitize_val<_Nb>::_S_do_sanitize_val(__val)) { }
#else
bitset(unsigned long __val)
: _Base(__val)
@@ -1509,6 +1529,7 @@ _GLIBCXX_END_NAMESPACE_CONTAINER
#undef _GLIBCXX_BITSET_WORDS
#undef _GLIBCXX_BITSET_BITS_PER_WORD
+#undef _GLIBCXX_BITSET_BITS_PER_ULL
#ifdef __GXX_EXPERIMENTAL_CXX0X__
@@ -1525,7 +1546,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
: public __hash_base<size_t, _GLIBCXX_STD_C::bitset<_Nb>>
{
size_t
- operator()(const _GLIBCXX_STD_C::bitset<_Nb>& __b) const
+ operator()(const _GLIBCXX_STD_C::bitset<_Nb>& __b) const noexcept
{
const size_t __clength = (_Nb + __CHAR_BIT__ - 1) / __CHAR_BIT__;
return std::_Hash_impl::hash(__b._M_getdata(), __clength);
@@ -1537,7 +1558,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
: public __hash_base<size_t, _GLIBCXX_STD_C::bitset<0>>
{
size_t
- operator()(const _GLIBCXX_STD_C::bitset<0>&) const
+ operator()(const _GLIBCXX_STD_C::bitset<0>&) const noexcept
{ return 0; }
};
diff --git a/gcc-4.6/libstdc++-v3/include/std/complex b/gcc-4.6/libstdc++-v3/include/std/complex
index aa6e81d24..da3c469f8 100644
--- a/gcc-4.6/libstdc++-v3/include/std/complex
+++ b/gcc-4.6/libstdc++-v3/include/std/complex
@@ -1,7 +1,7 @@
// The template and inlines for the -*- C++ -*- complex number classes.
// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
-// 2006, 2007, 2008, 2009, 2010
+// 2006, 2007, 2008, 2009, 2010, 2011
// Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
@@ -1695,12 +1695,9 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
std::complex<_Tp>
__complex_acosh(const std::complex<_Tp>& __z)
{
- std::complex<_Tp> __t((__z.real() - __z.imag())
- * (__z.real() + __z.imag()) - _Tp(1.0),
- _Tp(2.0) * __z.real() * __z.imag());
- __t = std::sqrt(__t);
-
- return std::log(__t + __z);
+ // Kahan's formula.
+ return _Tp(2.0) * std::log(std::sqrt(_Tp(0.5) * (__z + _Tp(1.0)))
+ + std::sqrt(_Tp(0.5) * (__z - _Tp(1.0))));
}
#if _GLIBCXX_USE_C99_COMPLEX_TR1
diff --git a/gcc-4.6/libstdc++-v3/include/std/condition_variable b/gcc-4.6/libstdc++-v3/include/std/condition_variable
index a0a3c0879..ff65dc49c 100644
--- a/gcc-4.6/libstdc++-v3/include/std/condition_variable
+++ b/gcc-4.6/libstdc++-v3/include/std/condition_variable
@@ -198,10 +198,25 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
void
wait(_Lock& __lock)
{
- unique_lock<mutex> __my_lock(_M_mutex);
- __lock.unlock();
- _M_cond.wait(__my_lock);
- __lock.lock();
+ // scoped unlock - unlocks in ctor, re-locks in dtor
+ struct _Unlock {
+ explicit _Unlock(_Lock& __lk) : _M_lock(__lk) { __lk.unlock(); }
+ ~_Unlock() noexcept(false)
+ {
+ if (uncaught_exception())
+ __try { _M_lock.lock(); } __catch(...) { }
+ else
+ _M_lock.lock();
+ }
+ _Lock& _M_lock;
+ };
+
+ unique_lock<mutex> __my_lock(_M_mutex);
+ _Unlock __unlock(__lock);
+ // _M_mutex must be unlocked before re-locking __lock so move
+ // ownership of _M_mutex lock to an object with shorter lifetime.
+ unique_lock<mutex> __my_lock2(std::move(__my_lock));
+ _M_cond.wait(__my_lock2);
}
diff --git a/gcc-4.6/libstdc++-v3/include/std/system_error b/gcc-4.6/libstdc++-v3/include/std/system_error
index da09a7588..6ef070a9d 100644
--- a/gcc-4.6/libstdc++-v3/include/std/system_error
+++ b/gcc-4.6/libstdc++-v3/include/std/system_error
@@ -359,7 +359,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
: public __hash_base<size_t, error_code>
{
size_t
- operator()(const error_code& __e) const
+ operator()(const error_code& __e) const noexcept
{
const size_t __tmp = std::_Hash_impl::hash(__e._M_value);
return std::_Hash_impl::__hash_combine(__e._M_cat, __tmp);
diff --git a/gcc-4.6/libstdc++-v3/include/std/thread b/gcc-4.6/libstdc++-v3/include/std/thread
index de58e8141..bd102fc8d 100644
--- a/gcc-4.6/libstdc++-v3/include/std/thread
+++ b/gcc-4.6/libstdc++-v3/include/std/thread
@@ -224,7 +224,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
: public __hash_base<size_t, thread::id>
{
size_t
- operator()(const thread::id& __id) const
+ operator()(const thread::id& __id) const noexcept
{ return std::_Hash_impl::hash(__id._M_thread); }
};
diff --git a/gcc-4.6/libstdc++-v3/include/std/typeindex b/gcc-4.6/libstdc++-v3/include/std/typeindex
index 79b3eadf7..78aeeb1e9 100644
--- a/gcc-4.6/libstdc++-v3/include/std/typeindex
+++ b/gcc-4.6/libstdc++-v3/include/std/typeindex
@@ -76,7 +76,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
{ return !_M_target->before(*__rhs._M_target); }
size_t
- hash_code() const
+ hash_code() const noexcept
{ return _M_target->hash_code(); }
const char*
@@ -97,7 +97,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
typedef type_index argument_type;
size_t
- operator()(const type_index& __ti) const
+ operator()(const type_index& __ti) const noexcept
{ return __ti.hash_code(); }
};
diff --git a/gcc-4.6/libstdc++-v3/include/tr1/complex b/gcc-4.6/libstdc++-v3/include/tr1/complex
index fc213b8f1..689ea167b 100644
--- a/gcc-4.6/libstdc++-v3/include/tr1/complex
+++ b/gcc-4.6/libstdc++-v3/include/tr1/complex
@@ -185,12 +185,9 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
std::complex<_Tp>
__complex_acosh(const std::complex<_Tp>& __z)
{
- std::complex<_Tp> __t((__z.real() - __z.imag())
- * (__z.real() + __z.imag()) - _Tp(1.0),
- _Tp(2.0) * __z.real() * __z.imag());
- __t = std::sqrt(__t);
-
- return std::log(__t + __z);
+ // Kahan's formula.
+ return _Tp(2.0) * std::log(std::sqrt(_Tp(0.5) * (__z + _Tp(1.0)))
+ + std::sqrt(_Tp(0.5) * (__z - _Tp(1.0))));
}
#if _GLIBCXX_USE_C99_COMPLEX_TR1
diff --git a/gcc-4.6/libstdc++-v3/include/tr1/poly_hermite.tcc b/gcc-4.6/libstdc++-v3/include/tr1/poly_hermite.tcc
index e86b3777c..95e8079d5 100644
--- a/gcc-4.6/libstdc++-v3/include/tr1/poly_hermite.tcc
+++ b/gcc-4.6/libstdc++-v3/include/tr1/poly_hermite.tcc
@@ -1,6 +1,6 @@
// Special functions -*- C++ -*-
-// Copyright (C) 2006, 2007, 2008, 2009, 2010
+// Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011
// Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
@@ -84,7 +84,7 @@ namespace tr1
unsigned int __i;
for (__H_nm2 = __H_0, __H_nm1 = __H_1, __i = 2; __i <= __n; ++__i)
{
- __H_n = 2 * (__x * __H_nm1 + (__i - 1) * __H_nm2);
+ __H_n = 2 * (__x * __H_nm1 - (__i - 1) * __H_nm2);
__H_nm2 = __H_nm1;
__H_nm1 = __H_n;
}
diff --git a/gcc-4.6/libstdc++-v3/libsupc++/del_op.cc b/gcc-4.6/libstdc++-v3/libsupc++/del_op.cc
index 86d4c1e29..d512146df 100644
--- a/gcc-4.6/libstdc++-v3/libsupc++/del_op.cc
+++ b/gcc-4.6/libstdc++-v3/libsupc++/del_op.cc
@@ -46,3 +46,11 @@ operator delete(void* ptr) throw ()
if (ptr)
std::free(ptr);
}
+
+_GLIBCXX_WEAK_DEFINITION void
+operator delete(void* ptr,
+ std::size_t bytes __attribute__((__unused__))) throw ()
+{
+ if (ptr)
+ std::free(ptr);
+}
diff --git a/gcc-4.6/libstdc++-v3/libsupc++/new b/gcc-4.6/libstdc++-v3/libsupc++/new
index 80ee3ba0f..7f7fdb8e4 100644
--- a/gcc-4.6/libstdc++-v3/libsupc++/new
+++ b/gcc-4.6/libstdc++-v3/libsupc++/new
@@ -93,6 +93,7 @@ namespace std
void* operator new(std::size_t) throw (std::bad_alloc);
void* operator new[](std::size_t) throw (std::bad_alloc);
void operator delete(void*) throw();
+void operator delete(void*, std::size_t) throw();
void operator delete[](void*) throw();
void* operator new(std::size_t, const std::nothrow_t&) throw();
void* operator new[](std::size_t, const std::nothrow_t&) throw();
diff --git a/gcc-4.6/libstdc++-v3/libsupc++/typeinfo b/gcc-4.6/libstdc++-v3/libsupc++/typeinfo
index 69311d69e..22ef49fa7 100644
--- a/gcc-4.6/libstdc++-v3/libsupc++/typeinfo
+++ b/gcc-4.6/libstdc++-v3/libsupc++/typeinfo
@@ -140,7 +140,7 @@ namespace std
{ return !operator==(__arg); }
#ifdef __GXX_EXPERIMENTAL_CXX0X__
- size_t hash_code() const throw()
+ size_t hash_code() const noexcept
{
# if !__GXX_MERGED_TYPEINFO_NAMES
return _Hash_bytes(name(), __builtin_strlen(name()),
diff --git a/gcc-4.6/libstdc++-v3/src/compatibility-c++0x.cc b/gcc-4.6/libstdc++-v3/src/compatibility-c++0x.cc
index 08a572761..133426eaa 100644
--- a/gcc-4.6/libstdc++-v3/src/compatibility-c++0x.cc
+++ b/gcc-4.6/libstdc++-v3/src/compatibility-c++0x.cc
@@ -52,33 +52,58 @@ namespace std _GLIBCXX_VISIBILITY(default)
#ifndef _GLIBCXX_LONG_DOUBLE_COMPAT_IMPL
template<>
- size_t
- hash<string>::operator()(string __s) const
- { return _Hash_impl::hash(__s.data(), __s.length()); }
+ struct hash<string>
+ {
+ size_t operator()(string) const;
+ };
+
+ size_t
+ hash<string>::operator()(string __s) const
+ { return _Hash_impl::hash(__s.data(), __s.length()); }
template<>
- size_t
- hash<const string&>::operator()(const string& __s) const
- { return _Hash_impl::hash(__s.data(), __s.length()); }
+ struct hash<const string&>
+ {
+ size_t operator()(const string&) const;
+ };
+
+ size_t
+ hash<const string&>::operator()(const string& __s) const
+ { return _Hash_impl::hash(__s.data(), __s.length()); }
#ifdef _GLIBCXX_USE_WCHAR_T
template<>
- size_t
- hash<wstring>::operator()(wstring __s) const
- { return _Hash_impl::hash(__s.data(), __s.length() * sizeof(wchar_t)); }
+ struct hash<wstring>
+ {
+ size_t operator()(wstring) const;
+ };
+
+ size_t
+ hash<wstring>::operator()(wstring __s) const
+ { return _Hash_impl::hash(__s.data(), __s.length() * sizeof(wchar_t)); }
template<>
- size_t
- hash<const wstring&>::operator()(const wstring& __s) const
- { return _Hash_impl::hash(__s.data(), __s.length() * sizeof(wchar_t)); }
+ struct hash<const wstring&>
+ {
+ size_t operator()(const wstring&) const;
+ };
+
+ size_t
+ hash<const wstring&>::operator()(const wstring& __s) const
+ { return _Hash_impl::hash(__s.data(), __s.length() * sizeof(wchar_t)); }
#endif
#endif
template<>
- size_t
- hash<error_code>::operator()(error_code __e) const
+ struct hash<error_code>
{
- const size_t __tmp = std::_Hash_impl::hash(__e._M_value);
- return std::_Hash_impl::__hash_combine(__e._M_cat, __tmp);
- }
+ size_t operator()(error_code) const;
+ };
+
+ size_t
+ hash<error_code>::operator()(error_code __e) const
+ {
+ const size_t __tmp = std::_Hash_impl::hash(__e._M_value);
+ return std::_Hash_impl::__hash_combine(__e._M_cat, __tmp);
+ }
}
diff --git a/gcc-4.6/libstdc++-v3/src/compatibility-ldbl.cc b/gcc-4.6/libstdc++-v3/src/compatibility-ldbl.cc
index a9bdb8b09..a103856ad 100644
--- a/gcc-4.6/libstdc++-v3/src/compatibility-ldbl.cc
+++ b/gcc-4.6/libstdc++-v3/src/compatibility-ldbl.cc
@@ -1,6 +1,6 @@
// Compatibility symbols for -mlong-double-64 compatibility -*- C++ -*-
-// Copyright (C) 2006, 2008, 2009, 2010
+// Copyright (C) 2006, 2008, 2009, 2010, 2011
// Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
@@ -69,14 +69,7 @@ namespace std _GLIBCXX_VISIBILITY(default)
// For std::tr1::hash<long double>::operator()
#define _GLIBCXX_LONG_DOUBLE_COMPAT_IMPL
-
-namespace std _GLIBCXX_VISIBILITY(default)
-{
- namespace tr1
- {
-#include "hash-long-double-aux.cc"
- }
-}
+#include "hash-long-double-tr1-aux.cc"
// std::tr1::hash<long double>::operator()
// and std::hash<long double>::operator()
diff --git a/gcc-4.6/libstdc++-v3/src/hash-long-double-aux.cc b/gcc-4.6/libstdc++-v3/src/hash-long-double-aux.cc
deleted file mode 100644
index d54d635f8..000000000
--- a/gcc-4.6/libstdc++-v3/src/hash-long-double-aux.cc
+++ /dev/null
@@ -1,50 +0,0 @@
-// std::hash and std::tr1::hash definitions, long double bits -*- C++ -*-
-
-// Copyright (C) 2010 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/>.
-
- // For long double, careful with random padding bits (e.g., on x86,
- // 10 bytes -> 12 bytes) and resort to frexp.
- template<>
- size_t
- hash<long double>::operator()(long double __val) const
- {
- // 0 and -0 both hash to zero.
- if (__val == 0.0L)
- return 0;
-
- int __exponent;
- __val = __builtin_frexpl(__val, &__exponent);
- __val = __val < 0.0l ? -(__val + 0.5l) : __val;
-
- const long double __mult = __SIZE_MAX__ + 1.0l;
- __val *= __mult;
-
- // Try to use all the bits of the mantissa (really necessary only
- // on 32-bit targets, at least for 80-bit floating point formats).
- const size_t __hibits = (size_t)__val;
- __val = (__val - (long double)__hibits) * __mult;
-
- const size_t __coeff = __SIZE_MAX__ / __LDBL_MAX_EXP__;
-
- return __hibits + (size_t)__val + __coeff * __exponent;
- }
diff --git a/gcc-4.6/libstdc++-v3/src/hash-long-double-tr1-aux.cc b/gcc-4.6/libstdc++-v3/src/hash-long-double-tr1-aux.cc
new file mode 100644
index 000000000..70ed45bbf
--- /dev/null
+++ b/gcc-4.6/libstdc++-v3/src/hash-long-double-tr1-aux.cc
@@ -0,0 +1,56 @@
+// std::tr1::hash definitions, long double bits -*- C++ -*-
+
+// Copyright (C) 2010, 2011 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/>.
+
+namespace std _GLIBCXX_VISIBILITY(default)
+{
+ namespace tr1
+ {
+ // For long double, careful with random padding bits (e.g., on x86,
+ // 10 bytes -> 12 bytes) and resort to frexp.
+ template<>
+ size_t
+ hash<long double>::operator()(long double __val) const
+ {
+ // 0 and -0 both hash to zero.
+ if (__val == 0.0L)
+ return 0;
+
+ int __exponent;
+ __val = __builtin_frexpl(__val, &__exponent);
+ __val = __val < 0.0l ? -(__val + 0.5l) : __val;
+
+ const long double __mult = __SIZE_MAX__ + 1.0l;
+ __val *= __mult;
+
+ // Try to use all the bits of the mantissa (really necessary only
+ // on 32-bit targets, at least for 80-bit floating point formats).
+ const size_t __hibits = (size_t)__val;
+ __val = (__val - (long double)__hibits) * __mult;
+
+ const size_t __coeff = __SIZE_MAX__ / __LDBL_MAX_EXP__;
+
+ return __hibits + (size_t)__val + __coeff * __exponent;
+ }
+ }
+}
diff --git a/gcc-4.6/libstdc++-v3/src/hash_c++0x.cc b/gcc-4.6/libstdc++-v3/src/hash_c++0x.cc
index 852498df6..d68507454 100644
--- a/gcc-4.6/libstdc++-v3/src/hash_c++0x.cc
+++ b/gcc-4.6/libstdc++-v3/src/hash_c++0x.cc
@@ -1,6 +1,6 @@
// std::hash definitions -*- C++ -*-
-// Copyright (C) 2010 Free Software Foundation, Inc.
+// Copyright (C) 2010, 2011 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
@@ -30,5 +30,27 @@
namespace std _GLIBCXX_VISIBILITY(default)
{
-#include "hash-long-double-aux.cc"
+ _GLIBCXX_PURE size_t
+ hash<long double>::operator()(long double __val) const noexcept
+ {
+ // 0 and -0 both hash to zero.
+ if (__val == 0.0L)
+ return 0;
+
+ int __exponent;
+ __val = __builtin_frexpl(__val, &__exponent);
+ __val = __val < 0.0l ? -(__val + 0.5l) : __val;
+
+ const long double __mult = __SIZE_MAX__ + 1.0l;
+ __val *= __mult;
+
+ // Try to use all the bits of the mantissa (really necessary only
+ // on 32-bit targets, at least for 80-bit floating point formats).
+ const size_t __hibits = (size_t)__val;
+ __val = (__val - (long double)__hibits) * __mult;
+
+ const size_t __coeff = __SIZE_MAX__ / __LDBL_MAX_EXP__;
+
+ return __hibits + (size_t)__val + __coeff * __exponent;
+ }
}
diff --git a/gcc-4.6/libstdc++-v3/src/hash_tr1.cc b/gcc-4.6/libstdc++-v3/src/hash_tr1.cc
index e707e827a..a5ac87e58 100644
--- a/gcc-4.6/libstdc++-v3/src/hash_tr1.cc
+++ b/gcc-4.6/libstdc++-v3/src/hash_tr1.cc
@@ -1,6 +1,6 @@
// std::tr1::hash definitions -*- C++ -*-
-// Copyright (C) 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
+// Copyright (C) 2007, 2008, 2009, 2010, 2011 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
@@ -25,12 +25,12 @@
#include <string>
#include <tr1/functional>
+#include "hash-long-double-tr1-aux.cc"
+
namespace std _GLIBCXX_VISIBILITY(default)
{
namespace tr1
{
-#include "hash-long-double-aux.cc"
-
#ifndef _GLIBCXX_LONG_DOUBLE_COMPAT_IMPL
template<>
size_t
diff --git a/gcc-4.6/libstdc++-v3/testsuite/18_support/headers/cstdbool/std_c++0x_neg.cc b/gcc-4.6/libstdc++-v3/testsuite/18_support/headers/cstdbool/std_c++0x_neg.cc
index 146b9656f..f8361c40c 100644
--- a/gcc-4.6/libstdc++-v3/testsuite/18_support/headers/cstdbool/std_c++0x_neg.cc
+++ b/gcc-4.6/libstdc++-v3/testsuite/18_support/headers/cstdbool/std_c++0x_neg.cc
@@ -20,7 +20,7 @@
#include <cstdbool>
-// { dg-error "upcoming ISO" "" { target *-*-* } 32 }
+// { dg-error "ISO C.. 2011" "" { target *-*-* } 32 }
diff --git a/gcc-4.6/libstdc++-v3/testsuite/18_support/headers/cstdint/std_c++0x_neg.cc b/gcc-4.6/libstdc++-v3/testsuite/18_support/headers/cstdint/std_c++0x_neg.cc
index afd65a36a..7dbc10ef2 100644
--- a/gcc-4.6/libstdc++-v3/testsuite/18_support/headers/cstdint/std_c++0x_neg.cc
+++ b/gcc-4.6/libstdc++-v3/testsuite/18_support/headers/cstdint/std_c++0x_neg.cc
@@ -20,7 +20,7 @@
#include <cstdint>
-// { dg-error "upcoming ISO" "" { target *-*-* } 32 }
+// { dg-error "ISO C.. 2011" "" { target *-*-* } 32 }
diff --git a/gcc-4.6/libstdc++-v3/testsuite/19_diagnostics/headers/system_error/std_c++0x_neg.cc b/gcc-4.6/libstdc++-v3/testsuite/19_diagnostics/headers/system_error/std_c++0x_neg.cc
index 9698cf031..38e27dc82 100644
--- a/gcc-4.6/libstdc++-v3/testsuite/19_diagnostics/headers/system_error/std_c++0x_neg.cc
+++ b/gcc-4.6/libstdc++-v3/testsuite/19_diagnostics/headers/system_error/std_c++0x_neg.cc
@@ -19,7 +19,7 @@
#include <system_error>
-// { dg-error "upcoming ISO" "" { target *-*-* } 32 }
+// { dg-error "ISO C.. 2011" "" { target *-*-* } 32 }
diff --git a/gcc-4.6/libstdc++-v3/testsuite/20_util/allocator/51626.cc b/gcc-4.6/libstdc++-v3/testsuite/20_util/allocator/51626.cc
new file mode 100644
index 000000000..951aa18fe
--- /dev/null
+++ b/gcc-4.6/libstdc++-v3/testsuite/20_util/allocator/51626.cc
@@ -0,0 +1,66 @@
+// Copyright (C) 2011 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/>.
+
+// { dg-options "-std=gnu++0x" }
+
+#include <memory>
+#include <vector>
+#include <testsuite_hooks.h>
+
+int count = 0;
+
+template <class T>
+ struct allocator98 : std::allocator<T>
+ {
+ template <class U> struct rebind { typedef allocator98<U> other; };
+
+ allocator98() { }
+
+ template <class U> allocator98(const allocator98<U>&) { };
+
+ void construct(T* p, const T& val)
+ {
+ ++count;
+ std::allocator<T>::construct(p, val);
+ }
+ };
+
+template <class T>
+ struct allocator11 : std::allocator<T>
+ {
+ template <class U> struct rebind { typedef allocator11<U> other; };
+
+ allocator11() { }
+
+ template <class U> allocator11(const allocator11<U>&) { };
+
+ template<typename... Args>
+ void construct(T* p, Args&&... args)
+ {
+ ++count;
+ std::allocator<T>::construct(p, std::forward<Args>(args)...);
+ }
+ };
+
+int main()
+{
+ std::vector< int, allocator98<int> > v98(1);
+ VERIFY( count == 0 );
+
+ std::vector< int, allocator11<int> > v11(1);
+ VERIFY( count == 1 );
+}
diff --git a/gcc-4.6/libstdc++-v3/testsuite/20_util/headers/type_traits/std_c++0x_neg.cc b/gcc-4.6/libstdc++-v3/testsuite/20_util/headers/type_traits/std_c++0x_neg.cc
index 4fd554e35..e69811409 100644
--- a/gcc-4.6/libstdc++-v3/testsuite/20_util/headers/type_traits/std_c++0x_neg.cc
+++ b/gcc-4.6/libstdc++-v3/testsuite/20_util/headers/type_traits/std_c++0x_neg.cc
@@ -20,7 +20,7 @@
#include <type_traits>
-// { dg-error "upcoming ISO" "" { target *-*-* } 32 }
+// { dg-error "ISO C.. 2011" "" { target *-*-* } 32 }
diff --git a/gcc-4.6/libstdc++-v3/testsuite/20_util/shared_ptr/cons/43820_neg.cc b/gcc-4.6/libstdc++-v3/testsuite/20_util/shared_ptr/cons/43820_neg.cc
index 36cf7f9c2..f5899d399 100644
--- a/gcc-4.6/libstdc++-v3/testsuite/20_util/shared_ptr/cons/43820_neg.cc
+++ b/gcc-4.6/libstdc++-v3/testsuite/20_util/shared_ptr/cons/43820_neg.cc
@@ -35,6 +35,6 @@ void test01()
// { dg-error "incomplete" "" { target *-*-* } 766 }
std::shared_ptr<X> p9(ap()); // { dg-error "here" }
- // { dg-error "incomplete" "" { target *-*-* } 858 }
+ // { dg-error "incomplete" "" { target *-*-* } 859 }
}
diff --git a/gcc-4.6/libstdc++-v3/testsuite/20_util/weak_ptr/comparison/cmp_neg.cc b/gcc-4.6/libstdc++-v3/testsuite/20_util/weak_ptr/comparison/cmp_neg.cc
index a210d0432..046fd3c6c 100644
--- a/gcc-4.6/libstdc++-v3/testsuite/20_util/weak_ptr/comparison/cmp_neg.cc
+++ b/gcc-4.6/libstdc++-v3/testsuite/20_util/weak_ptr/comparison/cmp_neg.cc
@@ -42,8 +42,8 @@ main()
return 0;
}
-// { dg-warning "note" "" { target *-*-* } 354 }
-// { dg-warning "note" "" { target *-*-* } 1085 }
+// { dg-warning "note" "" { target *-*-* } 358 }
+// { dg-warning "note" "" { target *-*-* } 1086 }
// { dg-warning "note" "" { target *-*-* } 468 }
// { dg-warning "note" "" { target *-*-* } 586 }
// { dg-warning "note" "" { target *-*-* } 1049 }
diff --git a/gcc-4.6/libstdc++-v3/testsuite/22_locale/time_get/get_weekday/char/38081-1.cc b/gcc-4.6/libstdc++-v3/testsuite/22_locale/time_get/get_weekday/char/38081-1.cc
index 7316cc454..4e039775a 100644
--- a/gcc-4.6/libstdc++-v3/testsuite/22_locale/time_get/get_weekday/char/38081-1.cc
+++ b/gcc-4.6/libstdc++-v3/testsuite/22_locale/time_get/get_weekday/char/38081-1.cc
@@ -1,6 +1,6 @@
// { dg-require-namedlocale "ru_RU.ISO-8859-5" }
-// Copyright (C) 2010 Free Software Foundation
+// Copyright (C) 2010, 2011 Free Software Foundation
//
// 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
@@ -49,7 +49,11 @@ void test01()
// get_weekday(iter_type, iter_type, ios_base&,
// ios_base::iostate&, tm*) const
+#if __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 14)
+ iss.str("\xbf\xdd\x2e");
+#else
iss.str("\xbf\xdd\xd4");
+#endif
iterator_type is_it01(iss);
tm time01;
memset(&time01, -1, sizeof(tm));
@@ -67,7 +71,11 @@ void test01()
VERIFY( time02.tm_wday == 1 );
VERIFY( errorstate == ios_base::eofbit );
+#if __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 14)
+ iss.str("\xbf\xdd\x2e\xd5\xd4\xd5\xdb\xec\xdd\xd8\xda");
+#else
iss.str("\xbf\xdd\xd4\xd5\xd4\xd5\xdb\xec\xdd\xd8\xda");
+#endif
iterator_type is_it03(iss);
tm time03;
memset(&time03, -1, sizeof(tm));
diff --git a/gcc-4.6/libstdc++-v3/testsuite/22_locale/time_get/get_weekday/char/38081-2.cc b/gcc-4.6/libstdc++-v3/testsuite/22_locale/time_get/get_weekday/char/38081-2.cc
index 1c079a400..ee8d6769d 100644
--- a/gcc-4.6/libstdc++-v3/testsuite/22_locale/time_get/get_weekday/char/38081-2.cc
+++ b/gcc-4.6/libstdc++-v3/testsuite/22_locale/time_get/get_weekday/char/38081-2.cc
@@ -2,7 +2,7 @@
// 2010-01-05 Paolo Carlini <paolo.carlini@oracle.com>
-// Copyright (C) 2010 Free Software Foundation
+// Copyright (C) 2010, 2011 Free Software Foundation
//
// 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
@@ -50,6 +50,15 @@ void test01()
// get_weekday(iter_type, iter_type, ios_base&,
// ios_base::iostate&, tm*) const
+#if __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 14)
+ const char* awdays[7] = { "\u0412\u0441\u002E",
+ "\u041F\u043D\u002E",
+ "\u0412\u0442\u002E",
+ "\u0421\u0440\u002E",
+ "\u0427\u0442\u002E",
+ "\u041F\u0442\u002E",
+ "\u0421\u0431\u002E" };
+#else
const char* awdays[7] = { "\u0412\u0441\u043A",
"\u041F\u043D\u0434",
"\u0412\u0442\u0440",
@@ -57,6 +66,7 @@ void test01()
"\u0427\u0442\u0432",
"\u041F\u0442\u043D",
"\u0421\u0431\u0442" };
+#endif
for (int i = 0; i < 7; ++i)
{
diff --git a/gcc-4.6/libstdc++-v3/testsuite/23_containers/bitset/cons/50268.cc b/gcc-4.6/libstdc++-v3/testsuite/23_containers/bitset/cons/50268.cc
new file mode 100644
index 000000000..6a61d7e2f
--- /dev/null
+++ b/gcc-4.6/libstdc++-v3/testsuite/23_containers/bitset/cons/50268.cc
@@ -0,0 +1,84 @@
+// { dg-options "-std=gnu++0x" }
+
+// Copyright (C) 2011 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 <bitset>
+#include <testsuite_hooks.h>
+
+// libstdc++/50268
+void test01()
+{
+ bool test __attribute__((unused)) = true;
+
+ std::bitset<1> b1(3ULL);
+ VERIFY( b1.count() == 1ULL );
+
+ std::bitset<3> b2(30ULL);
+ VERIFY( b2.count() == 2ULL );
+
+ std::bitset<6> b3(300ULL);
+ VERIFY( b3.count() == 3ULL );
+
+ std::bitset<9> b4(3000ULL);
+ VERIFY( b4.count() == 5ULL );
+
+ std::bitset<16> b5(300000ULL);
+ VERIFY( b5.count() == 7ULL );
+
+ std::bitset<24> b6(30000000ULL);
+ VERIFY( b6.count() == 9ULL );
+
+ std::bitset<32> b7(30000000000ULL);
+ VERIFY( b7.count() == 13ULL );
+
+ std::bitset<37> b8(3000000000000ULL);
+ VERIFY( b8.count() == 18ULL );
+
+ std::bitset<40> b9(30000000000000ULL);
+ VERIFY( b9.count() == 16ULL );
+
+ std::bitset<45> b10(30000000000000ULL);
+ VERIFY( b10.count() == 20ULL );
+
+ std::bitset<64> b11(30000000000000ULL);
+ VERIFY( b11.count() == 20ULL );
+
+ std::bitset<100> b12(30000000000000ULL);
+ VERIFY( b12.count() == 20ULL );
+
+ std::bitset<200> b13(30000000000000ULL);
+ VERIFY( b13.count() == 20ULL );
+
+ std::bitset<45> b14(18446744073709551615ULL);
+ VERIFY( b14.count() == 45ULL );
+
+ std::bitset<64> b15(18446744073709551615ULL);
+ VERIFY( b15.count() == 64ULL );
+
+ std::bitset<100> b16(18446744073709551615ULL);
+ VERIFY( b16.count() == 64ULL );
+
+ std::bitset<200> b17(18446744073709551615ULL);
+ VERIFY( b17.count() == 64ULL );
+}
+
+int main()
+{
+ test01();
+ return 0;
+}
diff --git a/gcc-4.6/libstdc++-v3/testsuite/23_containers/deque/modifiers/erase/3.cc b/gcc-4.6/libstdc++-v3/testsuite/23_containers/deque/modifiers/erase/3.cc
index 34d0f74f1..79a046ed7 100644
--- a/gcc-4.6/libstdc++-v3/testsuite/23_containers/deque/modifiers/erase/3.cc
+++ b/gcc-4.6/libstdc++-v3/testsuite/23_containers/deque/modifiers/erase/3.cc
@@ -1,4 +1,4 @@
-// Copyright (C) 2007, 2009 Free Software Foundation, Inc.
+// Copyright (C) 2007, 2009, 2010, 2011 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
@@ -31,7 +31,9 @@ void erase(size_t num_elm, size_t elm_strt, size_t elm_end)
x.erase(x.begin() + elm_strt, x.begin() + elm_end);
- const size_t min_num_cpy = std::min(elm_strt, num_elm - elm_end);
+ const size_t min_num_cpy
+ = elm_strt == elm_end ? 0 : std::min(elm_strt, num_elm - elm_end);
+
VERIFY( assignment_operator::count() == min_num_cpy );
}
diff --git a/gcc-4.6/libstdc++-v3/testsuite/23_containers/deque/modifiers/erase/50529.cc b/gcc-4.6/libstdc++-v3/testsuite/23_containers/deque/modifiers/erase/50529.cc
new file mode 100644
index 000000000..f534758a9
--- /dev/null
+++ b/gcc-4.6/libstdc++-v3/testsuite/23_containers/deque/modifiers/erase/50529.cc
@@ -0,0 +1,38 @@
+// { dg-options "-std=gnu++0x" }
+
+// 2011-09-26 Paolo Carlini <paolo.carlini@oracle.com>
+
+// Copyright (C) 2011 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 <deque>
+#include <testsuite_rvalref.h>
+
+// libstdc++/50529
+void test01()
+{
+ std::deque<__gnu_test::rvalstruct> d(10);
+
+ for (auto it = d.begin(); it != d.end(); ++it)
+ d.erase(it, it);
+}
+
+int main()
+{
+ test01();
+ return 0;
+}
diff --git a/gcc-4.6/libstdc++-v3/testsuite/23_containers/headers/array/std_c++0x_neg.cc b/gcc-4.6/libstdc++-v3/testsuite/23_containers/headers/array/std_c++0x_neg.cc
index e9317d7ed..bded29ee6 100644
--- a/gcc-4.6/libstdc++-v3/testsuite/23_containers/headers/array/std_c++0x_neg.cc
+++ b/gcc-4.6/libstdc++-v3/testsuite/23_containers/headers/array/std_c++0x_neg.cc
@@ -20,7 +20,7 @@
#include <array>
-// { dg-error "upcoming ISO" "" { target *-*-* } 32 }
+// { dg-error "ISO C.. 2011" "" { target *-*-* } 32 }
diff --git a/gcc-4.6/libstdc++-v3/testsuite/23_containers/headers/tuple/std_c++0x_neg.cc b/gcc-4.6/libstdc++-v3/testsuite/23_containers/headers/tuple/std_c++0x_neg.cc
index 0a2e073a5..b5a10d2d6 100644
--- a/gcc-4.6/libstdc++-v3/testsuite/23_containers/headers/tuple/std_c++0x_neg.cc
+++ b/gcc-4.6/libstdc++-v3/testsuite/23_containers/headers/tuple/std_c++0x_neg.cc
@@ -20,7 +20,7 @@
#include <tuple>
-// { dg-error "upcoming ISO" "" { target *-*-* } 32 }
+// { dg-error "ISO C.. 2011" "" { target *-*-* } 32 }
diff --git a/gcc-4.6/libstdc++-v3/testsuite/23_containers/headers/unordered_map/std_c++0x_neg.cc b/gcc-4.6/libstdc++-v3/testsuite/23_containers/headers/unordered_map/std_c++0x_neg.cc
index 0b32304ca..612124006 100644
--- a/gcc-4.6/libstdc++-v3/testsuite/23_containers/headers/unordered_map/std_c++0x_neg.cc
+++ b/gcc-4.6/libstdc++-v3/testsuite/23_containers/headers/unordered_map/std_c++0x_neg.cc
@@ -20,7 +20,7 @@
#include <unordered_map>
-// { dg-error "upcoming ISO" "" { target *-*-* } 32 }
+// { dg-error "ISO C.. 2011" "" { target *-*-* } 32 }
diff --git a/gcc-4.6/libstdc++-v3/testsuite/23_containers/headers/unordered_set/std_c++0x_neg.cc b/gcc-4.6/libstdc++-v3/testsuite/23_containers/headers/unordered_set/std_c++0x_neg.cc
index bc6963c80..85aca13c3 100644
--- a/gcc-4.6/libstdc++-v3/testsuite/23_containers/headers/unordered_set/std_c++0x_neg.cc
+++ b/gcc-4.6/libstdc++-v3/testsuite/23_containers/headers/unordered_set/std_c++0x_neg.cc
@@ -20,7 +20,7 @@
#include <unordered_set>
-// { dg-error "upcoming ISO" "" { target *-*-* } 32 }
+// { dg-error "ISO C.. 2011" "" { target *-*-* } 32 }
diff --git a/gcc-4.6/libstdc++-v3/testsuite/23_containers/map/modifiers/erase/51142.cc b/gcc-4.6/libstdc++-v3/testsuite/23_containers/map/modifiers/erase/51142.cc
new file mode 100644
index 000000000..f50b7b7e9
--- /dev/null
+++ b/gcc-4.6/libstdc++-v3/testsuite/23_containers/map/modifiers/erase/51142.cc
@@ -0,0 +1,38 @@
+// Copyright (C) 2011 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/>.
+//
+
+// { dg-do compile }
+// { dg-options "-std=gnu++0x" }
+
+#include <map>
+
+struct X
+{
+ template<typename T>
+ X(T&) {}
+};
+
+bool operator<(const X&, const X&) { return false; }
+
+// LWG 2059.
+void erasor(std::map<X, int>& s, X x)
+{
+ std::map<X, int>::iterator it = s.find(x);
+ if (it != s.end())
+ s.erase(it);
+}
diff --git a/gcc-4.6/libstdc++-v3/testsuite/23_containers/multimap/modifiers/erase/51142.cc b/gcc-4.6/libstdc++-v3/testsuite/23_containers/multimap/modifiers/erase/51142.cc
new file mode 100644
index 000000000..ee687f77c
--- /dev/null
+++ b/gcc-4.6/libstdc++-v3/testsuite/23_containers/multimap/modifiers/erase/51142.cc
@@ -0,0 +1,38 @@
+// Copyright (C) 2011 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/>.
+//
+
+// { dg-do compile }
+// { dg-options "-std=gnu++0x" }
+
+#include <map>
+
+struct X
+{
+ template<typename T>
+ X(T&) {}
+};
+
+bool operator<(const X&, const X&) { return false; }
+
+// LWG 2059.
+void erasor(std::multimap<X, int>& s, X x)
+{
+ std::multimap<X, int>::iterator it = s.find(x);
+ if (it != s.end())
+ s.erase(it);
+}
diff --git a/gcc-4.6/libstdc++-v3/testsuite/23_containers/multiset/modifiers/erase/51142.cc b/gcc-4.6/libstdc++-v3/testsuite/23_containers/multiset/modifiers/erase/51142.cc
new file mode 100644
index 000000000..c5beb6a8d
--- /dev/null
+++ b/gcc-4.6/libstdc++-v3/testsuite/23_containers/multiset/modifiers/erase/51142.cc
@@ -0,0 +1,38 @@
+// Copyright (C) 2011 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/>.
+//
+
+// { dg-do compile }
+// { dg-options "-std=gnu++0x" }
+
+#include <set>
+
+struct X
+{
+ template<typename T>
+ X(T&) {}
+};
+
+bool operator<(const X&, const X&) { return false; }
+
+// LWG 2059.
+void erasor(std::multiset<X>& s, X x)
+{
+ std::multiset<X>::iterator it = s.find(x);
+ if (it != s.end())
+ s.erase(it);
+}
diff --git a/gcc-4.6/libstdc++-v3/testsuite/23_containers/set/modifiers/erase/51142.cc b/gcc-4.6/libstdc++-v3/testsuite/23_containers/set/modifiers/erase/51142.cc
new file mode 100644
index 000000000..4fb296a95
--- /dev/null
+++ b/gcc-4.6/libstdc++-v3/testsuite/23_containers/set/modifiers/erase/51142.cc
@@ -0,0 +1,38 @@
+// Copyright (C) 2011 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/>.
+//
+
+// { dg-do compile }
+// { dg-options "-std=gnu++0x" }
+
+#include <set>
+
+struct X
+{
+ template<typename T>
+ X(T&) {}
+};
+
+bool operator<(const X&, const X&) { return false; }
+
+// LWG 2059.
+void erasor(std::set<X>& s, X x)
+{
+ std::set<X>::iterator it = s.find(x);
+ if (it != s.end())
+ s.erase(it);
+}
diff --git a/gcc-4.6/libstdc++-v3/testsuite/23_containers/unordered_map/erase/51142.cc b/gcc-4.6/libstdc++-v3/testsuite/23_containers/unordered_map/erase/51142.cc
new file mode 100644
index 000000000..7986fb23a
--- /dev/null
+++ b/gcc-4.6/libstdc++-v3/testsuite/23_containers/unordered_map/erase/51142.cc
@@ -0,0 +1,41 @@
+// Copyright (C) 2011 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/>.
+//
+
+// { dg-do compile }
+// { dg-options "-std=gnu++0x" }
+
+#include <unordered_map>
+
+struct X
+{
+ template<typename T>
+ X(T&) {}
+};
+
+struct X_hash
+{ std::size_t operator()(const X&) const { return 0; } };
+
+bool operator==(const X&, const X&) { return false; }
+
+// LWG 2059.
+void erasor(std::unordered_map<X, int, X_hash>& s, X x)
+{
+ std::unordered_map<X, int, X_hash>::iterator it = s.find(x);
+ if (it != s.end())
+ s.erase(it);
+}
diff --git a/gcc-4.6/libstdc++-v3/testsuite/23_containers/unordered_multimap/erase/51142.cc b/gcc-4.6/libstdc++-v3/testsuite/23_containers/unordered_multimap/erase/51142.cc
new file mode 100644
index 000000000..0d434ac8a
--- /dev/null
+++ b/gcc-4.6/libstdc++-v3/testsuite/23_containers/unordered_multimap/erase/51142.cc
@@ -0,0 +1,41 @@
+// Copyright (C) 2011 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/>.
+//
+
+// { dg-do compile }
+// { dg-options "-std=gnu++0x" }
+
+#include <unordered_map>
+
+struct X
+{
+ template<typename T>
+ X(T&) {}
+};
+
+struct X_hash
+{ std::size_t operator()(const X&) const { return 0; } };
+
+bool operator==(const X&, const X&) { return false; }
+
+// LWG 2059.
+void erasor(std::unordered_multimap<X, int, X_hash>& s, X x)
+{
+ std::unordered_multimap<X, int, X_hash>::iterator it = s.find(x);
+ if (it != s.end())
+ s.erase(it);
+}
diff --git a/gcc-4.6/libstdc++-v3/testsuite/23_containers/unordered_multiset/erase/51142.cc b/gcc-4.6/libstdc++-v3/testsuite/23_containers/unordered_multiset/erase/51142.cc
new file mode 100644
index 000000000..7a0a18352
--- /dev/null
+++ b/gcc-4.6/libstdc++-v3/testsuite/23_containers/unordered_multiset/erase/51142.cc
@@ -0,0 +1,41 @@
+// Copyright (C) 2011 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/>.
+//
+
+// { dg-do compile }
+// { dg-options "-std=gnu++0x" }
+
+#include <unordered_set>
+
+struct X
+{
+ template<typename T>
+ X(T&) {}
+};
+
+struct X_hash
+{ std::size_t operator()(const X&) const { return 0; } };
+
+bool operator==(const X&, const X&) { return false; }
+
+// LWG 2059.
+void erasor(std::unordered_multiset<X, X_hash>& s, X x)
+{
+ std::unordered_multiset<X, X_hash>::iterator it = s.find(x);
+ if (it != s.end())
+ s.erase(it);
+}
diff --git a/gcc-4.6/libstdc++-v3/testsuite/23_containers/unordered_set/erase/51142.cc b/gcc-4.6/libstdc++-v3/testsuite/23_containers/unordered_set/erase/51142.cc
new file mode 100644
index 000000000..ec5aeb1a2
--- /dev/null
+++ b/gcc-4.6/libstdc++-v3/testsuite/23_containers/unordered_set/erase/51142.cc
@@ -0,0 +1,41 @@
+// Copyright (C) 2011 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/>.
+//
+
+// { dg-do compile }
+// { dg-options "-std=gnu++0x" }
+
+#include <unordered_set>
+
+struct X
+{
+ template<typename T>
+ X(T&) {}
+};
+
+struct X_hash
+{ std::size_t operator()(const X&) const { return 0; } };
+
+bool operator==(const X&, const X&) { return false; }
+
+// LWG 2059.
+void erasor(std::unordered_set<X, X_hash>& s, X x)
+{
+ std::unordered_set<X, X_hash>::iterator it = s.find(x);
+ if (it != s.end())
+ s.erase(it);
+}
diff --git a/gcc-4.6/libstdc++-v3/testsuite/23_containers/vector/modifiers/erase/50529.cc b/gcc-4.6/libstdc++-v3/testsuite/23_containers/vector/modifiers/erase/50529.cc
new file mode 100644
index 000000000..d76bed53c
--- /dev/null
+++ b/gcc-4.6/libstdc++-v3/testsuite/23_containers/vector/modifiers/erase/50529.cc
@@ -0,0 +1,38 @@
+// { dg-options "-std=gnu++0x" }
+
+// 2011-09-26 Paolo Carlini <paolo.carlini@oracle.com>
+
+// Copyright (C) 2011 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 <vector>
+#include <testsuite_rvalref.h>
+
+// libstdc++/50529
+void test01()
+{
+ std::vector<__gnu_test::rvalstruct> v(10);
+
+ for (auto it = v.begin(); it != v.end(); ++it)
+ v.erase(it, it);
+}
+
+int main()
+{
+ test01();
+ return 0;
+}
diff --git a/gcc-4.6/libstdc++-v3/testsuite/23_containers/vector/requirements/dr438/assign_neg.cc b/gcc-4.6/libstdc++-v3/testsuite/23_containers/vector/requirements/dr438/assign_neg.cc
index 8c6a25cfe..1985074c1 100644
--- a/gcc-4.6/libstdc++-v3/testsuite/23_containers/vector/requirements/dr438/assign_neg.cc
+++ b/gcc-4.6/libstdc++-v3/testsuite/23_containers/vector/requirements/dr438/assign_neg.cc
@@ -18,7 +18,7 @@
// <http://www.gnu.org/licenses/>.
// { dg-do compile }
-// { dg-error "no matching" "" { target *-*-* } 1166 }
+// { dg-error "no matching" "" { target *-*-* } 1221 }
// { dg-excess-errors "" }
#include <vector>
diff --git a/gcc-4.6/libstdc++-v3/testsuite/23_containers/vector/requirements/dr438/constructor_1_neg.cc b/gcc-4.6/libstdc++-v3/testsuite/23_containers/vector/requirements/dr438/constructor_1_neg.cc
index 03aa5346c..fe2429598 100644
--- a/gcc-4.6/libstdc++-v3/testsuite/23_containers/vector/requirements/dr438/constructor_1_neg.cc
+++ b/gcc-4.6/libstdc++-v3/testsuite/23_containers/vector/requirements/dr438/constructor_1_neg.cc
@@ -18,7 +18,7 @@
// <http://www.gnu.org/licenses/>.
// { dg-do compile }
-// { dg-error "no matching" "" { target *-*-* } 1096 }
+// { dg-error "no matching" "" { target *-*-* } 1151 }
// { dg-excess-errors "" }
#include <vector>
diff --git a/gcc-4.6/libstdc++-v3/testsuite/23_containers/vector/requirements/dr438/constructor_2_neg.cc b/gcc-4.6/libstdc++-v3/testsuite/23_containers/vector/requirements/dr438/constructor_2_neg.cc
index a78e56c00..7616bca84 100644
--- a/gcc-4.6/libstdc++-v3/testsuite/23_containers/vector/requirements/dr438/constructor_2_neg.cc
+++ b/gcc-4.6/libstdc++-v3/testsuite/23_containers/vector/requirements/dr438/constructor_2_neg.cc
@@ -18,7 +18,7 @@
// <http://www.gnu.org/licenses/>.
// { dg-do compile }
-// { dg-error "no matching" "" { target *-*-* } 1096 }
+// { dg-error "no matching" "" { target *-*-* } 1151 }
// { dg-excess-errors "" }
#include <vector>
diff --git a/gcc-4.6/libstdc++-v3/testsuite/23_containers/vector/requirements/dr438/insert_neg.cc b/gcc-4.6/libstdc++-v3/testsuite/23_containers/vector/requirements/dr438/insert_neg.cc
index 1c29e29d3..3ff504fe7 100644
--- a/gcc-4.6/libstdc++-v3/testsuite/23_containers/vector/requirements/dr438/insert_neg.cc
+++ b/gcc-4.6/libstdc++-v3/testsuite/23_containers/vector/requirements/dr438/insert_neg.cc
@@ -18,7 +18,7 @@
// <http://www.gnu.org/licenses/>.
// { dg-do compile }
-// { dg-error "no matching" "" { target *-*-* } 1207 }
+// { dg-error "no matching" "" { target *-*-* } 1262 }
// { dg-excess-errors "" }
#include <vector>
diff --git a/gcc-4.6/libstdc++-v3/testsuite/25_algorithms/inplace_merge/49559.cc b/gcc-4.6/libstdc++-v3/testsuite/25_algorithms/inplace_merge/49559.cc
new file mode 100644
index 000000000..8b7b52e3f
--- /dev/null
+++ b/gcc-4.6/libstdc++-v3/testsuite/25_algorithms/inplace_merge/49559.cc
@@ -0,0 +1,72 @@
+// { dg-options "-std=gnu++0x" }
+
+// Copyright (C) 2011 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/>.
+
+#undef _GLIBCXX_CONCEPT_CHECKS
+
+// XXX FIXME: parallel-mode should deal correctly with moveable-only types
+// per C++0x, at minimum smoothly fall back to serial.
+#undef _GLIBCXX_PARALLEL
+
+#include <algorithm>
+#include <testsuite_hooks.h>
+#include <testsuite_iterators.h>
+#include <testsuite_rvalref.h>
+
+using __gnu_test::test_container;
+using __gnu_test::bidirectional_iterator_wrapper;
+using __gnu_test::rvalstruct;
+
+typedef test_container<rvalstruct, bidirectional_iterator_wrapper> Container;
+
+const int A[] = { 0, 1, 2, 3, 4, 5 };
+const int N = 6;
+
+bool are_ordered(const rvalstruct& lhs, const rvalstruct& rhs)
+{ return lhs < rhs; }
+
+// libstdc++/49559
+void test01()
+{
+ bool test __attribute__((unused)) = true;
+
+ rvalstruct s1[6];
+ std::copy(A, A + N, s1);
+ Container con1(s1, s1 + N);
+ std::inplace_merge(con1.begin(), con1.it(4), con1.end());
+ VERIFY( s1[0] == 0 && s1[1] == 1 && s1[2] == 2
+ && s1[3] == 3 && s1[4] == 4 && s1[5] == 5 );
+ VERIFY( s1[0].valid && s1[1].valid && s1[2].valid
+ && s1[3].valid && s1[4].valid && s1[5].valid );
+
+ rvalstruct s2[6];
+ std::copy(A, A + N, s2);
+ Container con2(s2, s2 + N);
+ std::inplace_merge(con2.begin(), con2.it(4), con2.end(), are_ordered);
+ VERIFY( s2[0] == 0 && s2[1] == 1 && s2[2] == 2
+ && s2[3] == 3 && s2[4] == 4 && s2[5] == 5 );
+ VERIFY( s2[0].valid && s2[1].valid && s2[2].valid
+ && s2[3].valid && s2[4].valid && s2[5].valid );
+}
+
+int
+main()
+{
+ test01();
+ return 0;
+}
diff --git a/gcc-4.6/libstdc++-v3/testsuite/25_algorithms/inplace_merge/moveable.cc b/gcc-4.6/libstdc++-v3/testsuite/25_algorithms/inplace_merge/moveable.cc
index f7a35ffec..6509957da 100644
--- a/gcc-4.6/libstdc++-v3/testsuite/25_algorithms/inplace_merge/moveable.cc
+++ b/gcc-4.6/libstdc++-v3/testsuite/25_algorithms/inplace_merge/moveable.cc
@@ -39,13 +39,59 @@ test01()
{
bool test __attribute__((unused)) = true;
- int array[]={0,2,4,1,3,5};
- rvalstruct rv_array[6];
- std::copy(array, array + 6, rv_array);
- container con(rv_array, rv_array + 6);
- std::inplace_merge(con.begin(), con.it(3), con.end());
- VERIFY( rv_array[0] == 0 && rv_array[1] == 1 && rv_array[2] == 2
- && rv_array[3] == 3 && rv_array[4] == 4 && rv_array[5] == 5 );
+ int array1[]={0,2,4,1,3,5};
+ rvalstruct rv_array1[6];
+ std::copy(array1, array1 + 6, rv_array1);
+ container con1(rv_array1, rv_array1 + 6);
+ std::inplace_merge(con1.begin(), con1.it(3), con1.end());
+ VERIFY( rv_array1[0] == 0 && rv_array1[1] == 1 && rv_array1[2] == 2
+ && rv_array1[3] == 3 && rv_array1[4] == 4 && rv_array1[5] == 5 );
+
+ int array2[]={0,2,4,5,1,3};
+ rvalstruct rv_array2[6];
+ std::copy(array2, array2 + 6, rv_array2);
+ container con2(rv_array2, rv_array2 + 6);
+ std::inplace_merge(con2.begin(), con2.it(4), con2.end());
+ VERIFY( rv_array2[0] == 0 && rv_array2[1] == 1 && rv_array2[2] == 2
+ && rv_array2[3] == 3 && rv_array2[4] == 4 && rv_array2[5] == 5 );
+
+ int array3[]={1,1,1,2,2,2};
+ rvalstruct rv_array3[6];
+ std::copy(array3, array3 + 6, rv_array3);
+ container con3(rv_array3, rv_array3 + 6);
+ std::inplace_merge(con3.begin(), con3.it(3), con3.end());
+ VERIFY( rv_array3[0] == 1 && rv_array3[1] == 1 && rv_array3[2] == 1
+ && rv_array3[3] == 2 && rv_array3[4] == 2 && rv_array3[5] == 2 );
+
+ int array4[]={1,1,1,1,2,2};
+ rvalstruct rv_array4[6];
+ std::copy(array4, array4 + 6, rv_array4);
+ container con4(rv_array4, rv_array4 + 6);
+ std::inplace_merge(con4.begin(), con4.it(4), con4.end());
+ VERIFY( rv_array4[0] == 1 && rv_array4[1] == 1 && rv_array4[2] == 1
+ && rv_array4[3] == 1 && rv_array4[4] == 2 && rv_array4[5] == 2 );
+
+ int array5[]={3,3,3,3};
+ rvalstruct rv_array5[4];
+ std::copy(array5, array5 + 4, rv_array5);
+ container con5(rv_array5, rv_array5 + 4);
+ std::inplace_merge(con5.begin(), con5.it(2), con5.end());
+ VERIFY( rv_array5[0] == 3 && rv_array5[1] == 3 && rv_array5[2] == 3
+ && rv_array5[3] == 3 );
+
+ int array6[]={3,3,3};
+ rvalstruct rv_array6[3];
+ std::copy(array6, array6 + 3, rv_array6);
+ container con6(rv_array6, rv_array6 + 3);
+ std::inplace_merge(con6.begin(), con6.it(0), con6.end());
+ VERIFY( rv_array6[0] == 3 && rv_array6[1] == 3 && rv_array6[2] == 3 );
+
+ int array7[]={3,3};
+ rvalstruct rv_array7[2];
+ std::copy(array7, array7 + 2, rv_array7);
+ container con7(rv_array7, rv_array7 + 2);
+ std::inplace_merge(con7.begin(), con7.it(2), con7.end());
+ VERIFY( rv_array7[0] == 3 && rv_array7[1] == 3 );
}
int
diff --git a/gcc-4.6/libstdc++-v3/testsuite/25_algorithms/inplace_merge/moveable2.cc b/gcc-4.6/libstdc++-v3/testsuite/25_algorithms/inplace_merge/moveable2.cc
index 32ab3c70c..a3a898cd5 100644
--- a/gcc-4.6/libstdc++-v3/testsuite/25_algorithms/inplace_merge/moveable2.cc
+++ b/gcc-4.6/libstdc++-v3/testsuite/25_algorithms/inplace_merge/moveable2.cc
@@ -1,6 +1,6 @@
// { dg-options "-std=gnu++0x" }
-// Copyright (C) 2009 Free Software Foundation, Inc.
+// Copyright (C) 2009, 2010, 2011 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
@@ -39,13 +39,59 @@ test01()
{
bool test __attribute__((unused)) = true;
- int array[]={0,2,4,1,3,5};
- rvalstruct rv_array[6];
- std::copy(array, array + 6, rv_array);
- container con(rv_array, rv_array + 6);
- std::inplace_merge(con.begin(), con.it(3), con.end(), are_ordered);
- VERIFY( rv_array[0] == 0 && rv_array[1] == 1 && rv_array[2] == 2
- && rv_array[3] == 3 && rv_array[4] == 4 && rv_array[5] == 5 );
+ int array1[]={0,2,4,1,3,5};
+ rvalstruct rv_array1[6];
+ std::copy(array1, array1 + 6, rv_array1);
+ container con1(rv_array1, rv_array1 + 6);
+ std::inplace_merge(con1.begin(), con1.it(3), con1.end(), are_ordered);
+ VERIFY( rv_array1[0] == 0 && rv_array1[1] == 1 && rv_array1[2] == 2
+ && rv_array1[3] == 3 && rv_array1[4] == 4 && rv_array1[5] == 5 );
+
+ int array2[]={0,2,4,5,1,3};
+ rvalstruct rv_array2[6];
+ std::copy(array2, array2 + 6, rv_array2);
+ container con2(rv_array2, rv_array2 + 6);
+ std::inplace_merge(con2.begin(), con2.it(4), con2.end(), are_ordered);
+ VERIFY( rv_array2[0] == 0 && rv_array2[1] == 1 && rv_array2[2] == 2
+ && rv_array2[3] == 3 && rv_array2[4] == 4 && rv_array2[5] == 5 );
+
+ int array3[]={1,1,1,2,2,2};
+ rvalstruct rv_array3[6];
+ std::copy(array3, array3 + 6, rv_array3);
+ container con3(rv_array3, rv_array3 + 6);
+ std::inplace_merge(con3.begin(), con3.it(3), con3.end(), are_ordered);
+ VERIFY( rv_array3[0] == 1 && rv_array3[1] == 1 && rv_array3[2] == 1
+ && rv_array3[3] == 2 && rv_array3[4] == 2 && rv_array3[5] == 2 );
+
+ int array4[]={1,1,1,1,2,2};
+ rvalstruct rv_array4[6];
+ std::copy(array4, array4 + 6, rv_array4);
+ container con4(rv_array4, rv_array4 + 6);
+ std::inplace_merge(con4.begin(), con4.it(4), con4.end(), are_ordered);
+ VERIFY( rv_array4[0] == 1 && rv_array4[1] == 1 && rv_array4[2] == 1
+ && rv_array4[3] == 1 && rv_array4[4] == 2 && rv_array4[5] == 2 );
+
+ int array5[]={3,3,3,3};
+ rvalstruct rv_array5[4];
+ std::copy(array5, array5 + 4, rv_array5);
+ container con5(rv_array5, rv_array5 + 4);
+ std::inplace_merge(con5.begin(), con5.it(2), con5.end(), are_ordered);
+ VERIFY( rv_array5[0] == 3 && rv_array5[1] == 3 && rv_array5[2] == 3
+ && rv_array5[3] == 3 );
+
+ int array6[]={3,3,3};
+ rvalstruct rv_array6[3];
+ std::copy(array6, array6 + 3, rv_array6);
+ container con6(rv_array6, rv_array6 + 3);
+ std::inplace_merge(con6.begin(), con6.it(0), con6.end(), are_ordered);
+ VERIFY( rv_array6[0] == 3 && rv_array6[1] == 3 && rv_array6[2] == 3 );
+
+ int array7[]={3,3};
+ rvalstruct rv_array7[2];
+ std::copy(array7, array7 + 2, rv_array7);
+ container con7(rv_array7, rv_array7 + 2);
+ std::inplace_merge(con7.begin(), con7.it(2), con7.end(), are_ordered);
+ VERIFY( rv_array7[0] == 3 && rv_array7[1] == 3 );
}
int
diff --git a/gcc-4.6/libstdc++-v3/testsuite/25_algorithms/stable_sort/49559.cc b/gcc-4.6/libstdc++-v3/testsuite/25_algorithms/stable_sort/49559.cc
new file mode 100644
index 000000000..544511793
--- /dev/null
+++ b/gcc-4.6/libstdc++-v3/testsuite/25_algorithms/stable_sort/49559.cc
@@ -0,0 +1,68 @@
+// { dg-options "-std=gnu++0x" }
+
+// Copyright (C) 2011 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/>.
+
+#undef _GLIBCXX_CONCEPT_CHECKS
+
+// XXX FIXME: parallel-mode should deal correctly with moveable-only types
+// per C++0x, at minimum smoothly fall back to serial.
+#undef _GLIBCXX_PARALLEL
+
+#include <algorithm>
+#include <testsuite_hooks.h>
+#include <testsuite_iterators.h>
+#include <testsuite_rvalref.h>
+
+using __gnu_test::test_container;
+using __gnu_test::random_access_iterator_wrapper;
+using __gnu_test::rvalstruct;
+
+typedef test_container<rvalstruct, random_access_iterator_wrapper> Container;
+
+const int A[] = { 10 };
+const int N = 1;
+
+bool order(const rvalstruct& lhs, const rvalstruct& rhs)
+{ return lhs < rhs; }
+
+// libstdc++/49559
+void test01()
+{
+ bool test __attribute__((unused)) = true;
+
+ rvalstruct s1[1];
+ std::copy(A, A + 1, s1);
+ Container con1(s1, s1 + 1);
+ std::stable_sort(con1.begin(), con1.end());
+ VERIFY( s1[0] == 10 );
+ VERIFY( s1[0].valid );
+
+ rvalstruct s2[1];
+ std::copy(A, A + 1, s2);
+ Container con2(s2, s2 + 1);
+ std::stable_sort(con2.begin(), con2.end(), order);
+ VERIFY( s2[0] == 10 );
+ VERIFY( s2[0].valid );
+}
+
+int
+main()
+{
+ test01();
+ return 0;
+}
diff --git a/gcc-4.6/libstdc++-v3/testsuite/26_numerics/cmath/51083.cc b/gcc-4.6/libstdc++-v3/testsuite/26_numerics/cmath/51083.cc
new file mode 100644
index 000000000..8ba9b10e5
--- /dev/null
+++ b/gcc-4.6/libstdc++-v3/testsuite/26_numerics/cmath/51083.cc
@@ -0,0 +1,62 @@
+// { dg-options "-std=gnu++0x" }
+//
+// Copyright (C) 2011 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 <cmath>
+
+namespace a
+{
+ template<typename> class Mat { };
+
+ template<typename T> struct Mat2 : Mat<T> { };
+
+ template<typename T>
+ int fdim(Mat<T>) { return 1; }
+
+ template<typename T, typename U>
+ int floor(Mat<T>, U) { return 1; }
+ template<typename T, typename U>
+ int floor(T, Mat<U>) { return 1; }
+
+ template<typename T, typename U, typename V>
+ int fma(Mat<T>, U, V) { return 1; }
+ template<typename T, typename U, typename V>
+ int fma(T, Mat<U>, V) { return 1; }
+ template<typename T, typename U, typename V>
+ int fma(T, U, Mat<V>) { return 1; }
+}
+
+int main()
+{
+ int __attribute__((unused)) i;
+
+ using namespace std;
+
+ a::Mat2<double> c;
+ i = fdim(c);
+ i = floor(c, 0.);
+ i = floor(0., c);
+ i = floor(c, 1);
+ i = floor(1, c);
+ i = fma(c, 0., 1.);
+ i = fma(0., c, 1.);
+ i = fma(0., 1., c);
+ i = fma(c, 0., 1);
+ i = fma(0., c, 1);
+ i = fma(0., 1, c);
+}
diff --git a/gcc-4.6/libstdc++-v3/testsuite/26_numerics/complex/50880.cc b/gcc-4.6/libstdc++-v3/testsuite/26_numerics/complex/50880.cc
new file mode 100644
index 000000000..2b70a99dd
--- /dev/null
+++ b/gcc-4.6/libstdc++-v3/testsuite/26_numerics/complex/50880.cc
@@ -0,0 +1,53 @@
+// { dg-options "-std=gnu++0x" }
+//
+// Copyright (C) 2011 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 <complex>
+#include <testsuite_hooks.h>
+
+template<typename T>
+ void test01_do()
+ {
+ bool test __attribute__((unused)) = true;
+
+ const std::complex<T> ca(T(-2), T(2));
+ const std::complex<T> cb(T(-2), T(0));
+ const std::complex<T> cc(T(-2), T(-2));
+
+ std::complex<T> cra = std::acosh(ca);
+ std::complex<T> crb = std::acosh(cb);
+ std::complex<T> crc = std::acosh(cc);
+
+ VERIFY( cra.real() > T(0) );
+ VERIFY( crb.real() > T(0) );
+ VERIFY( crc.real() > T(0) );
+ }
+
+// libstdc++/50880
+void test01()
+{
+ test01_do<float>();
+ test01_do<double>();
+ test01_do<long double>();
+}
+
+int main()
+{
+ test01();
+ return 0;
+}
diff --git a/gcc-4.6/libstdc++-v3/testsuite/26_numerics/complex/51083.cc b/gcc-4.6/libstdc++-v3/testsuite/26_numerics/complex/51083.cc
new file mode 100644
index 000000000..54e781ba1
--- /dev/null
+++ b/gcc-4.6/libstdc++-v3/testsuite/26_numerics/complex/51083.cc
@@ -0,0 +1,54 @@
+// { dg-options "-std=gnu++0x" }
+//
+// Copyright (C) 2011 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 <complex>
+
+namespace a
+{
+ template<typename> class Mat { };
+
+ template<typename T> struct Mat2 : Mat<T> { };
+
+ template<typename T> int arg(Mat<T>) { return 1; }
+ template<typename T> int conj(Mat<T>) { return 1; }
+ template<typename T> int imag(Mat<T>) { return 1; }
+ template<typename T> int norm(Mat<T>) { return 1; }
+ template<typename T> int proj(Mat<T>) { return 1; }
+ template<typename T> int real(Mat<T>) { return 1; }
+
+ template<typename T, typename U> int pow(Mat<T>, U) { return 1; }
+ template<typename T, typename U> int pow(T, Mat<U>) { return 1; }
+}
+
+int main()
+{
+ int __attribute__((unused)) i;
+
+ using namespace std;
+
+ a::Mat2< std::complex<double> > c;
+ i = arg(c);
+ i = conj(c);
+ i = imag(c);
+ i = norm(c);
+ i = proj(c);
+ i = real(c);
+ i = pow(std::complex<float>(), c);
+ i = pow(c, std::complex<float>());
+}
diff --git a/gcc-4.6/libstdc++-v3/testsuite/26_numerics/headers/ccomplex/std_c++0x_neg.cc b/gcc-4.6/libstdc++-v3/testsuite/26_numerics/headers/ccomplex/std_c++0x_neg.cc
index 29e8dac5f..2f1226f3e 100644
--- a/gcc-4.6/libstdc++-v3/testsuite/26_numerics/headers/ccomplex/std_c++0x_neg.cc
+++ b/gcc-4.6/libstdc++-v3/testsuite/26_numerics/headers/ccomplex/std_c++0x_neg.cc
@@ -20,7 +20,7 @@
#include <ccomplex>
-// { dg-error "upcoming ISO" "" { target *-*-* } 32 }
+// { dg-error "ISO C.. 2011" "" { target *-*-* } 32 }
diff --git a/gcc-4.6/libstdc++-v3/testsuite/26_numerics/headers/cfenv/std_c++0x_neg.cc b/gcc-4.6/libstdc++-v3/testsuite/26_numerics/headers/cfenv/std_c++0x_neg.cc
index 3a1910692..36e19d05a 100644
--- a/gcc-4.6/libstdc++-v3/testsuite/26_numerics/headers/cfenv/std_c++0x_neg.cc
+++ b/gcc-4.6/libstdc++-v3/testsuite/26_numerics/headers/cfenv/std_c++0x_neg.cc
@@ -20,7 +20,7 @@
#include <cfenv>
-// { dg-error "upcoming ISO" "" { target *-*-* } 32 }
+// { dg-error "ISO C.. 2011" "" { target *-*-* } 32 }
diff --git a/gcc-4.6/libstdc++-v3/testsuite/26_numerics/headers/ctgmath/std_c++0x_neg.cc b/gcc-4.6/libstdc++-v3/testsuite/26_numerics/headers/ctgmath/std_c++0x_neg.cc
index 23b266e85..b8238df95 100644
--- a/gcc-4.6/libstdc++-v3/testsuite/26_numerics/headers/ctgmath/std_c++0x_neg.cc
+++ b/gcc-4.6/libstdc++-v3/testsuite/26_numerics/headers/ctgmath/std_c++0x_neg.cc
@@ -20,7 +20,7 @@
#include <ctgmath>
-// { dg-error "upcoming ISO" "" { target *-*-* } 32 }
+// { dg-error "ISO C.. 2011" "" { target *-*-* } 32 }
diff --git a/gcc-4.6/libstdc++-v3/testsuite/26_numerics/headers/random/std_c++0x_neg.cc b/gcc-4.6/libstdc++-v3/testsuite/26_numerics/headers/random/std_c++0x_neg.cc
index 1f83cdac6..467caa073 100644
--- a/gcc-4.6/libstdc++-v3/testsuite/26_numerics/headers/random/std_c++0x_neg.cc
+++ b/gcc-4.6/libstdc++-v3/testsuite/26_numerics/headers/random/std_c++0x_neg.cc
@@ -20,7 +20,7 @@
#include <random>
-// { dg-error "upcoming ISO" "" { target *-*-* } 32 }
+// { dg-error "ISO C.. 2011" "" { target *-*-* } 32 }
diff --git a/gcc-4.6/libstdc++-v3/testsuite/27_io/headers/cinttypes/std_c++0x_neg.cc b/gcc-4.6/libstdc++-v3/testsuite/27_io/headers/cinttypes/std_c++0x_neg.cc
index 21da0770b..0285417ab 100644
--- a/gcc-4.6/libstdc++-v3/testsuite/27_io/headers/cinttypes/std_c++0x_neg.cc
+++ b/gcc-4.6/libstdc++-v3/testsuite/27_io/headers/cinttypes/std_c++0x_neg.cc
@@ -20,7 +20,7 @@
#include <cinttypes>
-// { dg-error "upcoming ISO" "" { target *-*-* } 32 }
+// { dg-error "ISO C.. 2011" "" { target *-*-* } 32 }
diff --git a/gcc-4.6/libstdc++-v3/testsuite/28_regex/algorithms/regex_replace/char/51711.cc b/gcc-4.6/libstdc++-v3/testsuite/28_regex/algorithms/regex_replace/char/51711.cc
new file mode 100644
index 000000000..5532713ce
--- /dev/null
+++ b/gcc-4.6/libstdc++-v3/testsuite/28_regex/algorithms/regex_replace/char/51711.cc
@@ -0,0 +1,31 @@
+// { dg-options "-std=gnu++0x" }
+// { dg-do compile }
+
+// Copyright (C) 2011 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 <regex>
+#include <string>
+
+// libstdc++/51711
+void test01()
+{
+ std::string toProcess("Bug\r\n");
+ std::string result __attribute__((unused))
+ = std::regex_replace(toProcess, std::regex("\\r"), std::string("\\r"));
+}
diff --git a/gcc-4.6/libstdc++-v3/testsuite/28_regex/algorithms/regex_replace/wchar_t/51711.cc b/gcc-4.6/libstdc++-v3/testsuite/28_regex/algorithms/regex_replace/wchar_t/51711.cc
new file mode 100644
index 000000000..66b74e458
--- /dev/null
+++ b/gcc-4.6/libstdc++-v3/testsuite/28_regex/algorithms/regex_replace/wchar_t/51711.cc
@@ -0,0 +1,31 @@
+// { dg-options "-std=gnu++0x" }
+// { dg-do compile }
+
+// Copyright (C) 2011 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 <regex>
+#include <string>
+
+// libstdc++/51711
+void test01()
+{
+ std::wstring toProcess(L"Bug\r\n");
+ std::wstring result __attribute__((unused))
+ = std::regex_replace(toProcess, std::wregex(L"\\r"), std::wstring(L"\\r"));
+}
diff --git a/gcc-4.6/libstdc++-v3/testsuite/28_regex/headers/regex/std_c++0x_neg.cc b/gcc-4.6/libstdc++-v3/testsuite/28_regex/headers/regex/std_c++0x_neg.cc
index 21a98b8ae..b5289f802 100644
--- a/gcc-4.6/libstdc++-v3/testsuite/28_regex/headers/regex/std_c++0x_neg.cc
+++ b/gcc-4.6/libstdc++-v3/testsuite/28_regex/headers/regex/std_c++0x_neg.cc
@@ -20,7 +20,7 @@
#include <regex>
-// { dg-error "upcoming ISO" "" { target *-*-* } 32 }
+// { dg-error "ISO C.. 2011" "" { target *-*-* } 32 }
diff --git a/gcc-4.6/libstdc++-v3/testsuite/29_atomics/headers/atomic/std_c++0x_neg.cc b/gcc-4.6/libstdc++-v3/testsuite/29_atomics/headers/atomic/std_c++0x_neg.cc
index be390b0f7..38b49b6db 100644
--- a/gcc-4.6/libstdc++-v3/testsuite/29_atomics/headers/atomic/std_c++0x_neg.cc
+++ b/gcc-4.6/libstdc++-v3/testsuite/29_atomics/headers/atomic/std_c++0x_neg.cc
@@ -20,7 +20,7 @@
#include <atomic> // { dg-excess-errors "In file included from" }
-// { dg-error "upcoming ISO" "" { target *-*-* } 32 }
+// { dg-error "ISO C.. 2011" "" { target *-*-* } 32 }
diff --git a/gcc-4.6/libstdc++-v3/testsuite/30_threads/condition_variable_any/50862.cc b/gcc-4.6/libstdc++-v3/testsuite/30_threads/condition_variable_any/50862.cc
new file mode 100644
index 000000000..b85a5e136
--- /dev/null
+++ b/gcc-4.6/libstdc++-v3/testsuite/30_threads/condition_variable_any/50862.cc
@@ -0,0 +1,80 @@
+// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* alpha*-*-osf* mips-sgi-irix6* } }
+// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* alpha*-*-osf* mips-sgi-irix6* } }
+// { dg-options " -std=gnu++0x -pthreads" { target *-*-solaris* } }
+// { dg-options " -std=gnu++0x " { target *-*-cygwin *-*-darwin* } }
+// { dg-require-cstdint "" }
+// { dg-require-gthreads "" }
+// { dg-require-sched-yield "" }
+
+// Copyright (C) 2011 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 <condition_variable>
+#include <thread>
+#include <mutex>
+#include <array>
+#include <sstream>
+
+struct scoped_thread
+{
+ ~scoped_thread() { if (t.joinable()) t.join(); }
+ std::thread t;
+};
+
+int main()
+{
+ typedef std::unique_lock<std::mutex> Lock;
+
+ std::mutex m;
+ std::condition_variable_any cond;
+ unsigned int product = 0;
+ const unsigned int count = 10;
+
+ // writing to stream causes timing changes which makes deadlock easier
+ // to reproduce - do not remove
+ std::ostringstream out;
+
+ // create consumers
+ std::array<scoped_thread, 2> threads;
+ for (std::size_t i = 0; i < threads.size(); ++i)
+ threads[i].t
+ = std::thread( [&]
+ {
+ for (unsigned int i = 0; i < count; ++i)
+ {
+ std::this_thread::yield();
+ Lock lock(m);
+ while(product == 0)
+ cond.wait(lock);
+ out << "got product "
+ << std::this_thread::get_id()
+ << ' ' << product << std::endl;
+ --product;
+ }
+ } );
+
+ // single producer
+ for (std::size_t i = 0; i < threads.size() * count; ++i)
+ {
+ std::this_thread::yield();
+ Lock lock(m);
+ ++product;
+ out << "setting product " << std::this_thread::get_id()
+ << ' ' << product << std::endl;
+ cond.notify_one();
+ }
+}
diff --git a/gcc-4.6/libstdc++-v3/testsuite/30_threads/headers/condition_variable/std_c++0x_neg.cc b/gcc-4.6/libstdc++-v3/testsuite/30_threads/headers/condition_variable/std_c++0x_neg.cc
index 6e345243c..5df33d943 100644
--- a/gcc-4.6/libstdc++-v3/testsuite/30_threads/headers/condition_variable/std_c++0x_neg.cc
+++ b/gcc-4.6/libstdc++-v3/testsuite/30_threads/headers/condition_variable/std_c++0x_neg.cc
@@ -20,7 +20,7 @@
#include <condition_variable>
-// { dg-error "upcoming ISO" "" { target *-*-* } 32 }
+// { dg-error "ISO C.. 2011" "" { target *-*-* } 32 }
diff --git a/gcc-4.6/libstdc++-v3/testsuite/30_threads/headers/future/std_c++0x_neg.cc b/gcc-4.6/libstdc++-v3/testsuite/30_threads/headers/future/std_c++0x_neg.cc
index 5dbaffdef..ec018f736 100644
--- a/gcc-4.6/libstdc++-v3/testsuite/30_threads/headers/future/std_c++0x_neg.cc
+++ b/gcc-4.6/libstdc++-v3/testsuite/30_threads/headers/future/std_c++0x_neg.cc
@@ -20,7 +20,7 @@
#include <future>
-// { dg-error "upcoming ISO" "" { target *-*-* } 32 }
+// { dg-error "ISO C.. 2011" "" { target *-*-* } 32 }
diff --git a/gcc-4.6/libstdc++-v3/testsuite/30_threads/headers/mutex/std_c++0x_neg.cc b/gcc-4.6/libstdc++-v3/testsuite/30_threads/headers/mutex/std_c++0x_neg.cc
index 31bf41c06..3d7a09d82 100644
--- a/gcc-4.6/libstdc++-v3/testsuite/30_threads/headers/mutex/std_c++0x_neg.cc
+++ b/gcc-4.6/libstdc++-v3/testsuite/30_threads/headers/mutex/std_c++0x_neg.cc
@@ -20,7 +20,7 @@
#include <mutex>
-// { dg-error "upcoming ISO" "" { target *-*-* } 32 }
+// { dg-error "ISO C.. 2011" "" { target *-*-* } 32 }
diff --git a/gcc-4.6/libstdc++-v3/testsuite/30_threads/headers/thread/std_c++0x_neg.cc b/gcc-4.6/libstdc++-v3/testsuite/30_threads/headers/thread/std_c++0x_neg.cc
index cc8a3877d..6089f3317 100644
--- a/gcc-4.6/libstdc++-v3/testsuite/30_threads/headers/thread/std_c++0x_neg.cc
+++ b/gcc-4.6/libstdc++-v3/testsuite/30_threads/headers/thread/std_c++0x_neg.cc
@@ -22,4 +22,4 @@
#include <thread>
-// { dg-error "upcoming ISO" "" { target *-*-* } 32 }
+// { dg-error "ISO C.. 2011" "" { target *-*-* } 32 }
diff --git a/gcc-4.6/libstdc++-v3/testsuite/ext/profile/mutex_extensions_neg.cc b/gcc-4.6/libstdc++-v3/testsuite/ext/profile/mutex_extensions_neg.cc
index c0b1f688a..58cab3a66 100644
--- a/gcc-4.6/libstdc++-v3/testsuite/ext/profile/mutex_extensions_neg.cc
+++ b/gcc-4.6/libstdc++-v3/testsuite/ext/profile/mutex_extensions_neg.cc
@@ -25,4 +25,4 @@
#include <vector>
-// { dg-error "multiple inlined namespaces" "" { target *-*-* } 241 }
+// { dg-error "multiple inlined namespaces" "" { target *-*-* } 242 }
diff --git a/gcc-4.6/libstdc++-v3/testsuite/ext/type_traits/add_unsigned_floating_neg.cc b/gcc-4.6/libstdc++-v3/testsuite/ext/type_traits/add_unsigned_floating_neg.cc
index 98202bdb8..3e46b8538 100644
--- a/gcc-4.6/libstdc++-v3/testsuite/ext/type_traits/add_unsigned_floating_neg.cc
+++ b/gcc-4.6/libstdc++-v3/testsuite/ext/type_traits/add_unsigned_floating_neg.cc
@@ -35,4 +35,4 @@ int main()
}
// { dg-error "instantiated from" "" { target *-*-* } 28 }
-// { dg-error "no type" "" { target *-*-* } 69 }
+// { dg-error "no type" "" { target *-*-* } 70 }
diff --git a/gcc-4.6/libstdc++-v3/testsuite/ext/type_traits/add_unsigned_integer_neg.cc b/gcc-4.6/libstdc++-v3/testsuite/ext/type_traits/add_unsigned_integer_neg.cc
index f08c879e5..59bc10153 100644
--- a/gcc-4.6/libstdc++-v3/testsuite/ext/type_traits/add_unsigned_integer_neg.cc
+++ b/gcc-4.6/libstdc++-v3/testsuite/ext/type_traits/add_unsigned_integer_neg.cc
@@ -36,4 +36,4 @@ int main()
}
// { dg-error "invalid use of incomplete" "" { target *-*-* } 28 }
-// { dg-error "declaration of" "" { target *-*-* } 63 }
+// { dg-error "declaration of" "" { target *-*-* } 64 }
diff --git a/gcc-4.6/libstdc++-v3/testsuite/ext/type_traits/remove_unsigned_floating_neg.cc b/gcc-4.6/libstdc++-v3/testsuite/ext/type_traits/remove_unsigned_floating_neg.cc
index 486baad93..291ef7554 100644
--- a/gcc-4.6/libstdc++-v3/testsuite/ext/type_traits/remove_unsigned_floating_neg.cc
+++ b/gcc-4.6/libstdc++-v3/testsuite/ext/type_traits/remove_unsigned_floating_neg.cc
@@ -35,4 +35,4 @@ int main()
}
// { dg-error "instantiated from" "" { target *-*-* } 28 }
-// { dg-error "no type" "" { target *-*-* } 112 }
+// { dg-error "no type" "" { target *-*-* } 113 }
diff --git a/gcc-4.6/libstdc++-v3/testsuite/ext/type_traits/remove_unsigned_integer_neg.cc b/gcc-4.6/libstdc++-v3/testsuite/ext/type_traits/remove_unsigned_integer_neg.cc
index 1ad1d93bf..0f79877f7 100644
--- a/gcc-4.6/libstdc++-v3/testsuite/ext/type_traits/remove_unsigned_integer_neg.cc
+++ b/gcc-4.6/libstdc++-v3/testsuite/ext/type_traits/remove_unsigned_integer_neg.cc
@@ -36,4 +36,4 @@ int main()
}
// { dg-error "invalid use of incomplete" "" { target *-*-* } 28 }
-// { dg-error "declaration of" "" { target *-*-* } 106 }
+// { dg-error "declaration of" "" { target *-*-* } 107 }
diff --git a/gcc-4.6/libstdc++-v3/testsuite/tr1/8_c_compatibility/cmath/51083.cc b/gcc-4.6/libstdc++-v3/testsuite/tr1/8_c_compatibility/cmath/51083.cc
new file mode 100644
index 000000000..504305a30
--- /dev/null
+++ b/gcc-4.6/libstdc++-v3/testsuite/tr1/8_c_compatibility/cmath/51083.cc
@@ -0,0 +1,62 @@
+// { dg-options "-std=gnu++0x" }
+//
+// Copyright (C) 2011 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 <tr1/cmath>
+
+namespace a
+{
+ template<typename> class Mat { };
+
+ template<typename T> struct Mat2 : Mat<T> { };
+
+ template<typename T>
+ int fdim(Mat<T>) { return 1; }
+
+ template<typename T, typename U>
+ int floor(Mat<T>, U) { return 1; }
+ template<typename T, typename U>
+ int floor(T, Mat<U>) { return 1; }
+
+ template<typename T, typename U, typename V>
+ int fma(Mat<T>, U, V) { return 1; }
+ template<typename T, typename U, typename V>
+ int fma(T, Mat<U>, V) { return 1; }
+ template<typename T, typename U, typename V>
+ int fma(T, U, Mat<V>) { return 1; }
+}
+
+int main()
+{
+ int __attribute__((unused)) i;
+
+ using namespace std::tr1;
+
+ a::Mat2<double> c;
+ i = fdim(c);
+ i = floor(c, 0.);
+ i = floor(0., c);
+ i = floor(c, 1);
+ i = floor(1, c);
+ i = fma(c, 0., 1.);
+ i = fma(0., c, 1.);
+ i = fma(0., 1., c);
+ i = fma(c, 0., 1);
+ i = fma(0., c, 1);
+ i = fma(0., 1, c);
+}
diff --git a/gcc-4.6/libstdc++-v3/testsuite/tr1/8_c_compatibility/complex/50880.cc b/gcc-4.6/libstdc++-v3/testsuite/tr1/8_c_compatibility/complex/50880.cc
new file mode 100644
index 000000000..eaa2f3d81
--- /dev/null
+++ b/gcc-4.6/libstdc++-v3/testsuite/tr1/8_c_compatibility/complex/50880.cc
@@ -0,0 +1,51 @@
+// Copyright (C) 2011 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 <tr1/complex>
+#include <testsuite_hooks.h>
+
+template<typename T>
+ void test01_do()
+ {
+ bool test __attribute__((unused)) = true;
+
+ const std::complex<T> ca(T(-2), T(2));
+ const std::complex<T> cb(T(-2), T(0));
+ const std::complex<T> cc(T(-2), T(-2));
+
+ std::complex<T> cra = std::tr1::acosh(ca);
+ std::complex<T> crb = std::tr1::acosh(cb);
+ std::complex<T> crc = std::tr1::acosh(cc);
+
+ VERIFY( cra.real() > T(0) );
+ VERIFY( crb.real() > T(0) );
+ VERIFY( crc.real() > T(0) );
+ }
+
+// libstdc++/50880
+void test01()
+{
+ test01_do<float>();
+ test01_do<double>();
+ test01_do<long double>();
+}
+
+int main()
+{
+ test01();
+ return 0;
+}
diff --git a/gcc-4.6/libstdc++-v3/testsuite/tr1/8_c_compatibility/complex/51083.cc b/gcc-4.6/libstdc++-v3/testsuite/tr1/8_c_compatibility/complex/51083.cc
new file mode 100644
index 000000000..f41914ee9
--- /dev/null
+++ b/gcc-4.6/libstdc++-v3/testsuite/tr1/8_c_compatibility/complex/51083.cc
@@ -0,0 +1,54 @@
+// { dg-options "-std=gnu++0x" }
+//
+// Copyright (C) 2011 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 <tr1/complex>
+
+namespace a
+{
+ template<typename> class Mat { };
+
+ template<typename T> struct Mat2 : Mat<T> { };
+
+ template<typename T> int arg(Mat<T>) { return 1; }
+ template<typename T> int conj(Mat<T>) { return 1; }
+ template<typename T> int imag(Mat<T>) { return 1; }
+ template<typename T> int norm(Mat<T>) { return 1; }
+ template<typename T> int proj(Mat<T>) { return 1; }
+ template<typename T> int real(Mat<T>) { return 1; }
+
+ template<typename T, typename U> int pow(Mat<T>, U) { return 1; }
+ template<typename T, typename U> int pow(T, Mat<U>) { return 1; }
+}
+
+int main()
+{
+ int __attribute__((unused)) i;
+
+ using namespace std::tr1;
+
+ a::Mat2< std::complex<double> > c;
+ i = arg(c);
+ i = conj(c);
+ i = imag(c);
+ i = norm(c);
+ i = proj(c);
+ i = real(c);
+ i = pow(std::complex<float>(), c);
+ i = pow(c, std::complex<float>());
+}
diff --git a/gcc-4.6/libstdc++-v3/testsuite/util/testsuite_abi.cc b/gcc-4.6/libstdc++-v3/testsuite/util/testsuite_abi.cc
index ea100b681..97fb31a77 100644
--- a/gcc-4.6/libstdc++-v3/testsuite/util/testsuite_abi.cc
+++ b/gcc-4.6/libstdc++-v3/testsuite/util/testsuite_abi.cc
@@ -194,6 +194,8 @@ check_version(symbol& test, bool added)
known_versions.push_back("GLIBCXX_3.4.14");
known_versions.push_back("GLIBCXX_3.4.15");
known_versions.push_back("GLIBCXX_3.4.16");
+ known_versions.push_back("GLIBCXX_3.4.17");
+ known_versions.push_back("GLIBCXX_3.4.18");
known_versions.push_back("GLIBCXX_LDBL_3.4");
known_versions.push_back("GLIBCXX_LDBL_3.4.7");
known_versions.push_back("GLIBCXX_LDBL_3.4.10");
@@ -560,4 +562,3 @@ demangle(const std::string& mangled)
}
return name;
}
-
diff --git a/gcc-4.6/libstdc++-v3/testsuite/util/testsuite_rvalref.h b/gcc-4.6/libstdc++-v3/testsuite/util/testsuite_rvalref.h
index 8e37bbdb0..7725e580a 100644
--- a/gcc-4.6/libstdc++-v3/testsuite/util/testsuite_rvalref.h
+++ b/gcc-4.6/libstdc++-v3/testsuite/util/testsuite_rvalref.h
@@ -68,6 +68,7 @@ namespace __gnu_test
operator=(rvalstruct&& in)
{
bool test __attribute__((unused)) = true;
+ VERIFY( this != &in );
VERIFY( in.valid == true );
val = in.val;
in.valid = false;