Commit Graph

2666 Commits

Author SHA1 Message Date
Paolo Carlini b4904956fa re PR libstdc++/55979 ([C++11] std::list range construction imposes unnecessary conversion constraints)
2013-03-17  Paolo Carlini  <paolo.carlini@oracle.com>

	PR libstdc++/55979
	* include/bits/stl_list.h (_M_initialize_dispatch(_InputIterator,
	_InputIterator, __false_type)): Use emplace_back.
	* testsuite/23_containers/list/cons/55979.cc: New.
	* testsuite/23_containers/list/modifiers/1.h: Adjust.
	* testsuite/23_containers/list/requirements/dr438/assign_neg.cc:
	Adjust dg-error line number.

From-SVN: r196755
2013-03-17 18:27:52 +00:00
Jason Merrill 5275b2c7d7 re PR c++/55017 ([DR 1051] [C++11] Rvalue-reference member should cause copy constructor to be deleted, but still declared)
PR c++/55017
	* method.c (walk_field_subobs): Disallow copy of rvalue ref.

From-SVN: r196728
2013-03-16 22:35:01 -04:00
Jonathan Wakely 3442f18d26 re PR libstdc++/56002 ([C++11] allow generic locks to be used without requiring plattform support for threads)
PR libstdc++/56002
	* include/std/mutex (lock_guard, unique_lock, lock): Define without
	depending on _GLIBCXX_HAS_GTHREADS.
	* testsuite/30_threads/lock_guard/cons/1.cc: Run on all targets.

From-SVN: r196706
2013-03-16 19:45:53 +00:00
Jonathan Wakely aaad548e18 re PR libstdc++/56492 (std::packaged_task requires CopyConstructible stored task)
PR libstdc++/56492
	* include/std/future (__future_base::_Result): Add result_type
	typedef.
	(__future_base::_S_allocate_result): Overload for std::allocator.
	(__future_base::_Task_setter): Use _Result::result_type instead of
	deducing the type from the task.
	(__future_base::_Task_state): Store allocator to allow shared state
	to be reset.  Replace std::function with member of target object type
	accessed via ...
	(__future_base::_Task_state_base): New abstract base class.
	(__future_base::_Task_state_base::_M_run): New virtual function to
	invoke type-erased target object.
	(__future_base::_Task_state_base::_M_reset): New virtual function to
	create new shared_state using same target object and allocator.
	(__future_base::__create_task_state): Allocate a new _Task_state.
	(packaged_task::packaged_task): Use __create_task_state.
	(packaged_task::reset): Use _Task_state_base::_M_reset.
	* testsuite/30_threads/packaged_task/cons/56492.cc: New.

From-SVN: r196695
2013-03-16 02:48:06 +00:00
Jonathan Wakely 1f069142c7 re PR libstdc++/56613 (map::operator[](key_type&&) fails with custom allocator)
PR libstdc++/56613
	* include/bits/stl_tree.h (_Rb_tree::_M_create_node): Use
	allocator_traits instead of calling construct directly.
	* testsuite/23_containers/map/56613.cc: New.

From-SVN: r196666
2013-03-14 23:28:11 +00:00
Paolo Carlini 8a38ebb653 re PR libstdc++/56609 ([C++11] Several type traits give incorrect results for std::nullptr_t)
2013-03-13  Paolo Carlini  <paolo.carlini@oracle.com>

	PR libstdc++/56609
	* include/std/type_traits (is_fundamental): Add std::nullptr_t.
	* testsuite/20_util/is_fundamental/value.cc: Extend.
	* testsuite/20_util/is_compound/value.cc: Likewise.

From-SVN: r196630
2013-03-13 11:15:45 +00:00
Paolo Carlini 03a42414ab 55463.cc: Avoid -Wunused warnings.
2013-03-09  Paolo Carlini  <paolo.carlini@oracle.com>

	* testsuite/20_util/function_objects/mem_fn/55463.cc: Avoid
	-Wunused warnings.

From-SVN: r196572
2013-03-09 11:45:48 +00:00
François Dumont 68d047cb48 vector.tcc (vector<>operator=(const vector<>&): Reset pointers after deallocation when memory can be reused.
2013-03-08  François Dumont  <fdumont@gcc.gnu.org>

	* include/bits/vector.tcc (vector<>operator=(const vector<>&):
	Reset pointers after deallocation when memory can be reused.
	* testsuite/23_containers/vector/allocator/minimal.cc: Insert
	elements to really challenge C++11 allocator integration.
	* testsuite/23_containers/vector/allocator/copy.cc: Likewise.
	* testsuite/23_containers/vector/allocator/copy_assign.cc:
	Likewise.
	* testsuite/23_containers/vector/allocator/move_assign.cc:
	Likewise.
	* testsuite/23_containers/vector/allocator/swap.cc: Likewise and
	swap vector back before checks on memory/personality mapping are
	performed.
	* testsuite/23_containers/forward_list/allocator/minimal.cc:
	Insert element to really challenge C++11 allocator integration.
	* testsuite/23_containers/forward_list/allocator/copy.cc:
	Likewise.
	* testsuite/23_containers/forward_list/allocator/copy_assign.cc:
	Likewise.
	* testsuite/23_containers/forward_list/allocator/move_assign.cc:
	Likewise.
	* testsuite/23_containers/forward_list/allocator/swap.cc: Likewise
	and swap forward_list back before checks on memory/personality
	mapping are performed.

From-SVN: r196557
2013-03-08 20:08:20 +00:00
Ulrich Drepper d233c23756 Add math constants and triangular and von Mises distributions.
From-SVN: r196407
2013-03-03 00:12:28 +00:00
Jonathan Wakely a26f0501b4 re PR libstdc++/56012 ([C++11] Narrowing conversion in atomic_flag)
PR libstdc++/56012
	* include/bits/atomic_base.h (atomic_flag): Fix narrowing conversion.
	* testsuite/29_atomics/atomic/operators/56012.cc: New.

	PR libstdc++/56011
	* include/std/atomic (atomic<bool>::operator=(bool) volatile): Add
	missing overload.
	* testsuite/29_atomics/atomic/operators/56011.cc: New.

From-SVN: r196296
2013-02-26 23:46:21 +00:00
Jonathan Wakely 4731c96644 55043.cc: Add missing namespace qualification.
* testsuite/23_containers/unordered_set/55043.cc: Add missing
	namespace qualification.
	* testsuite/23_containers/unordered_multiset/55043.cc: Likewise.

From-SVN: r196183
2013-02-20 21:23:44 +00:00
Benjamin Kosnik c0ffa2badb user.cfg.in: Set __cplusplus to 201103L.
2013-02-19  Benjamin Kosnik  <bkoz@redhat.com>

	* doc/doxygen/user.cfg.in: Set __cplusplus to 201103L. Change to
	_GLIBCXX_INCLUDE_AS_CXX11. DIRECTORY_GRAPH, MARKDOWN_SUPPORT,
	AUTOLINK_SUPPORT to NO. Update to doxygen 1.8.3.1.
	* include/bits/stl_pair.h: Add to utilities group.
	* include/std/tuple: Same.
	* include/std/typeindex: Same.

	* include/bits/stringfwd.h: Fix markup.
	* include/std/limits: Same.
	* include/std/type_traits: Same.
	* include/tr1/memory: Same.
	* include/tr1/regex: Same.
	* scripts/run_doxygen: Comment.
	* testsuite/20_util/uses_allocator/cons_neg.cc: Fixup line numbers.

From-SVN: r196162
2013-02-20 01:52:36 +00:00
Jason Merrill 5b858a6cc3 quick_exit.cc: #if out the whole test if unsupported.
* testsuite/18_support/quick_exit/quick_exit.cc: #if out the whole
	test if unsupported.

From-SVN: r196066
2013-02-14 20:26:54 -05:00
Marc Glisse 1c259e8b49 re PR libstdc++/56111 ({float,double,long double} complex not accepted anymore)
2013-02-13  Marc Glisse  <marc.glisse@inria.fr>

	PR libstdc++/56111
	* include/std/complex (complex): Undefine.
	* include/c_compatibility/complex.h (complex): Only undefine if
	<complex> has been included.
	* testsuite/26_numerics/complex/56111.cc: New testcase.

From-SVN: r196034
2013-02-13 21:58:53 +00:00
Julian Brown 1590a83511 38081-1.cc (test01): Don't expect dots after abbreviated weekday names for ru_RU for glibc versions...
libstdc++-v3/
	* testsuite/22_locale/time_get/get_weekday/char/38081-1.cc (test01):
	Don't expect dots after abbreviated weekday names for ru_RU for
	glibc versions >= 2.17.
	* testsuite/22_locale/time_get/get_weekday/char/38081-2.cc (test01):
	Likewise.

From-SVN: r195971
2013-02-12 10:32:01 +00:00
Paolo Carlini 42906f7940 cstdlib (at_quick_exit, quick_exit): Do not declare.
2013-02-11  Paolo Carlini  <paolo.carlini@oracle.com>

	* include/c_std/cstdlib (at_quick_exit, quick_exit): Do not declare.
	* include/c_global/cstdlib (at_quick_exit, quick_exit): Declare only
	in C++11 mode and if available in the underlying C library.
	* testsuite/18_support/quick_exit/quick_exit.cc: Compile with
	-std=gnu++11; check _GLIBCXX_HAVE_AT_QUICK_EXIT and
	_GLIBCXX_HAVE_QUICK_EXIT.

From-SVN: r195961
2013-02-11 23:42:43 +00:00
Jason Merrill cc999d0300 linkage.m4 (GLIBCXX_CHECK_STDLIB_DECL_AND_LINKAGE): New.
* linkage.m4 (GLIBCXX_CHECK_STDLIB_DECL_AND_LINKAGE): New.
	(GLIBCXX_CHECK_STDLIB_SUPPORT): Check for atexit and at_quick_exit.
	* include/c_std/cstdlib: Add atexit and at_quick_exit.
	* include/c_global/cstdlib: Add atexit and at_quick_exit.
	* testsuite/18_support/quick_exit/quick_exit.cc: New.

From-SVN: r195948
2013-02-11 12:50:13 -05:00
Paolo Carlini 3b424b30be re PR libstdc++/56282 (std::basic_ios<char> broken with -std=c++11 (undefined reference))
2013-02-11  Paolo Carlini  <paolo.carlini@oracle.com>

	PR libstdc++/56282
	Revert:
	2013-02-06  Edward Smith-Rowland  <3dw4rd@verizon.net>

	PR libstdc++/56193
	* include/bits/basic_ios.h: Replace operator void*() const
	with explicit operator bool() const in C++11 and greater.
	* testsuite/27_io/basic_ios/pr56193.cc: New file.

From-SVN: r195939
2013-02-11 10:30:43 +00:00
Jonathan Wakely dfed5434f3 re PR libstdc++/56267 (unordered containers require Assignable hash function)
PR libstdc++/56267
	* include/bits/hashtable.h (__cache_default): Check if hash function
	is copy assignable.
	* testsuite/23_containers/unordered_set/56267.cc: New.
	* testsuite/23_containers/unordered_set/instantiation_neg.cc: Adjust
	dg-error line number.
	* testsuite/23_containers/unordered_set/
	not_default_constructible_hash_neg.cc: Likewise.

From-SVN: r195936
2013-02-11 00:19:29 +00:00
Jonathan Wakely a9b68b8289 re PR libstdc++/56278 (unordered containers fail static assertion)
PR libstdc++/56278
	* include/bits/hashtable_policy.h (_Hash_code_base): Make default
	constructor public.
	* testsuite/23_containers/unordered_set/56278.cc: New.

From-SVN: r195935
2013-02-11 00:19:14 +00:00
Edward Smith-Rowland be59c9322a re PR libstdc++/56216 (TR1 bessel functions bomb at x == 0!)
PR libstdc++/56216

From-SVN: r195886
2013-02-08 14:10:48 +00:00
Paolo Carlini 54353978a4 pr56193.cc: Tweak.
2013-02-07  Paolo Carlini  <paolo.carlini@oracle.com>

	* testsuite/27_io/basic_ios/pr56193.cc: Tweak.

From-SVN: r195852
2013-02-07 15:20:58 +00:00
Edward Smith-Rowland b31317e44f Add the full Copyright blurb on the PR56193 test.
From-SVN: r195851
2013-02-07 15:11:11 +00:00
Edward Smith-Rowland fcf0430bda PR56193 - Wrong test operator for basic_ios in C++11.
From-SVN: r195849
2013-02-07 14:27:45 +00:00
François Dumont 4df047dd34 functional_hash.h (std::__is_fast_hash<>): New.
2013-02-04  François Dumont  <fdumont@gcc.gnu.org>

	* include/bits/functional_hash.h (std::__is_fast_hash<>): New.
	* include/bits/basic_string.h: Specialize previous to mark
	std::hash for string types as slow.
	* include/bits/hashtable.h (__cache_default): Replace is_integral
	with __is_fast_hash.
	* src/c++11/hash_c++0x.cc: Add type_traits include.
	* testsuite/23_containers/unordered_set/instantiation_neg.cc:
	Adapt dg-error line number.
	* testsuite/23_containers/unordered_set/
	not_default_constructible_hash_neg.cc: Likewise.

From-SVN: r195738
2013-02-04 21:14:07 +00:00
Richard Sandiford 405feeb871 Update copyright in libstdc++-v3.
From-SVN: r195701
2013-02-03 17:54:05 +00:00
Jonathan Wakely 0addb273c5 re PR libstdc++/56112 (cannot create unordered_map from range of types convertible to value_type)
PR libstdc++/56112
	* include/bits/hashtable_policy.h (insert(_Pair&&)): Use _M_emplace
	to construct value_type explicitly before trying to extract the key.
	* testsuite/23_containers/unordered_map/cons/56112.cc: New.

From-SVN: r195520
2013-01-28 23:07:35 +00:00
François Dumont 5b3be7cf99 hashtable_policy.h (_Local_iterator_base): Use _Hashtable_ebo_helper to embed functors into the local_iterator when necessary.
2013-01-28  François Dumont  <fdumont@gcc.gnu.org>

	* include/bits/hashtable_policy.h (_Local_iterator_base): Use
	_Hashtable_ebo_helper to embed functors into the local_iterator
	when necessary. Pass information about functors involved in hash
	code by copy.
	* include/bits/hashtable.h (__cache_default): Do not cache for
	builtin integral types unless the hash functor is not noexcept
	qualified or is not default constructible. Adapt static assertions
	and local iterator instantiations.
	* include/debug/unordered_set
	(std::__debug::unordered_set<>::erase): Detect local iterators to
	invalidate using contained node rather than generating a dummy
	local_iterator instance.
	(std::__debug::unordered_multiset<>::erase): Likewise.
	* include/debug/unordered_map
	(std::__debug::unordered_map<>::erase): Likewise.
	(std::__debug::unordered_multimap<>::erase): Likewise.
	* testsuite/performance/23_containers/insert_erase/41975.cc: Test
	std::tr1 and std versions of unordered_set regardless of any
	macro. Add test on default cache behavior.
	* testsuite/performance/23_containers/insert/54075.cc: Likewise.
	* testsuite/23_containers/unordered_set/instantiation_neg.cc:
	Adapt line number.
	* testsuite/23_containers/unordered_set/
	not_default_constructible_hash_neg.cc: New.
	* testsuite/23_containers/unordered_set/buckets/swap.cc: New.

From-SVN: r195517
2013-01-28 20:52:13 +00:00
Jakub Jelinek 0a18c815f9 explicit-hle.cc: Tightten scan-assembler-times regexps...
* testsuite/29_atomics/atomic_flag/test_and_set/explicit-hle.cc:
	Tightten scan-assembler-times regexps, add dg-additional-options for
	ia32, add -g0 -fno-exceptions -fno-asynchronous-unwind-tables to
	dg-options.

From-SVN: r195383
2013-01-22 18:15:47 +01:00
Andi Kleen d76b6ea417 libstdc++: Add mem_order_hle_acquire/release to atomic.h v2
The underlying compiler supports additional __ATOMIC_HLE_ACQUIRE/RELEASE
memmodel flags for TSX, but this was not exposed to the C++ wrapper.
Handle it there.

These are additional flags, so some of assert checks need to mask
off the flags before checking the memory model type.

libstdc++-v3/:
2013-01-12  Andi Kleen  <ak@linux.intel.com>
	    Jonathan Wakely  <jwakely.gcc@gmail.com>

        PR libstdc++/55223
	* include/bits/atomic_base.h (__memory_order_modifier): Add
	__memory_order_mask, __memory_order_modifier_mask,
	__memory_order_hle_acquire, __memory_order_hle_release.
	(operator|,operator&): Add.
	(__cmpexch_failure_order):  Rename to __cmpexch_failure_order2.
	(__cmpexch_failure_order): Add.
	(clear, store, load, compare_exchange_weak, compare_exchange_strong):
	Handle flags.
	* testsuite/29_atomics/atomic_flag/test_and_set/explicit-hle.cc:
	Add.

Co-Authored-By: Jonathan Wakely <jwakely.gcc@gmail.com>

From-SVN: r195321
2013-01-20 19:03:22 +00:00
Jonathan Wakely c93fa3ca7e re PR libstdc++/55861 ([C++11] `std::shared_future::get' is not const-qualified)
PR libstdc++/55861
	* include/std/future (_State_base::_S_check(const shared_ptr<T>&)):
	Fix return type.
	(__basic_future::_M_get_result()): Const qualify.
	(shared_future::get()): Likewise.
	* testsuite/30_threads/shared_future/members/get.cc: Use const
	objects.

From-SVN: r195314
2013-01-19 23:42:55 +00:00
Jonathan Wakely b7202baf14 PR libstdc++/55043 (again)
PR libstdc++/55043 (again)
	* include/bits/alloc_traits.h (allocator_traits::construct): Disable
	unless construction would be well-formed.
	(__allow_copy_cons, __check_copy_constructible): Define.
	* include/bits/unordered_map.h (__check_copy_constructible): Use as
	base class so copy constructor will be deleted if appropriate.
	(is_copy_constructible): Remove specialization.
	* include/bits/unordered_set.h: Likewise.
	* include/debug/unordered_map.h: Undo previous commit. Default copy
	and move constructors.
	* include/debug/unordered_set.h: Likewise.
	* include/profile/unordered_map.h: Undo previous commit.
	* include/profile/unordered_set.h: Likewise.
	* testsuite/23_containers/unordered_map/55043.cc: Fix test.
	* testsuite/23_containers/unordered_multimap/55043.cc: Likewise.
	* testsuite/23_containers/unordered_multiset/55043.cc: Likewise.
	* testsuite/23_containers/unordered_set/55043.cc: Likewise.
	* testsuite/23_containers/unordered_map/requirements/53339.cc: XFAIL,
	cannot support incomplete types.
	* testsuite/23_containers/unordered_multimap/requirements/53339.cc:
	Likewise.

From-SVN: r195253
2013-01-16 23:56:00 +00:00
Jonathan Wakely 8175e9866c re PR libstdc++/55043 (issue with nesting unordered_map containing unique_ptr into vector)
PR libstdc++/55043
	* include/std/unordered_map: Include alloc_traits.h
	* include/std/unordered_set: Likewise.
	* include/bits/alloc_traits.h: Define __is_copy_insertable.
	* include/bits/unordered_map.h: Use it.
	* include/bits/unordered_set.h: Likewise.
	* include/debug/unordered_map.h: Likewise.
	* include/debug/unordered_set.h: Likewise.
	* include/profile/unordered_map.h: Likewise.
	* include/profile/unordered_set.h: Likewise.
	* include/bits/hashtable.h: Fix comment typos.
	* testsuite/23_containers/unordered_map/55043.cc: New.
	* testsuite/23_containers/unordered_multimap/55043.cc: New.
	* testsuite/23_containers/unordered_multiset/55043.cc: New.
	* testsuite/23_containers/unordered_set/55043.cc: New.

From-SVN: r195231
2013-01-16 09:20:34 +00:00
Steve Ellcey 5a0727d990 vector.cc: Shrink memory usage under simulator.
2013-01-14  Steve Ellcey  <sellcey@mips.com>

	* testsuite/libstdc++-v3/testsuite/23_containers/vector/profile/vector.cc:
	Shrink memory usage under simulator.
	* testsuite/libstdc++-v3/testsuite/26_numerics/valarray/28277.cc: Ditto.
	* testsuite/libstdc++-v3/testsuite/27_io/basic_istream/extractors_character/wchar_t/4.cc:
	Ditto.
	* testsuite/libstdc++-v3/testsuite/27_io/basic_istream/getline/wchar_t/5.cc:
	Ditto.
	* testsuite/libstdc++-v3/testsuite/27_io/basic_istream/ignore/wchar_t/2.cc:
	Ditto.
	* testsuite/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_character/wchar_t/28277-1.cc:
	Ditto.
	* testsuite/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_character/wchar_t/28277-2.cc:
	Ditto.
	* testsuite/libstdc++-v3/testsuite/27_io/basic_stringbuf/overflow/wchar_t/1.cc:
	Ditto.
	* testsuite/libstdc++-v3/testsuite/27_io/basic_stringbuf/setbuf/wchar_t/4.cc:
	Ditto.

From-SVN: r195177
2013-01-14 20:57:58 +00:00
Janis Johnson 93b2c9a52e gdb-test.exp (gdb_batch_check): Catch error running gdb command.
* testsuite/lib/gdb-test.exp (gdb_batch_check): Catch error running
	gdb command.

From-SVN: r195115
2013-01-11 20:11:36 +00:00
Jonathan Wakely 890e166507 re PR c++/55908 (Problem binding a const member function to a const object)
PR libstdc++/55908
	* include/std/functional (_Mem_fn::operator()): Fix constraints to
	avoid ambiguity.
	* testsuite/20_util/function_objects/mem_fn/55908.cc: New.
	* testsuite/20_util/bind/ref_neg.cc: Adjust dg-error line numbers.

From-SVN: r195035
2013-01-08 21:01:14 +00:00
Jonathan Wakely 78aff33680 re PR libstdc++/55847 (mistake bad_weak_ptr::what() message)
PR libstdc++/55847
	* src/c++11/shared_ptr.cc (bad_weak_ptr::what()): Correct string.
	* testsuite/20_util/shared_ptr/cons/weak_ptr_expired.cc: Verify
	string.

	PR libstdc++/55728
	* include/std/functional (bad_function_call::what()): Declare.
	* src/c++11/functional.cc (bad_function_call::what()): Define.
	* config/abi/pre/gnu.ver (bad_function_call::what()): Export.
	* testsuite/20_util/bad_function_call/what.cc: New.

From-SVN: r194958
2013-01-07 00:50:16 +00:00
Richard Sandiford adf8bb4f07 insert_fn_imps.hpp: Fix typo in copyright years.
libstdc++-v3/
	* include/ext/pb_ds/detail/splay_tree_/insert_fn_imps.hpp: Fix typo
	in copyright years.
	* testsuite/22_locale/time_get/get_weekday/wchar_t/3.cc: Likewise.

From-SVN: r194941
2013-01-06 11:53:01 +00:00
Jakub Jelinek 90d04a445c Update Copyright years for files modified in 2011 and/or 2012.
From-SVN: r194903
2013-01-04 13:49:55 +01:00
Jonathan Wakely 23df853421 functional (_Require): Move to ...
* include/std/functional (_Require): Move to ...
	* include/std/type_traits (_Require): ... here.
	* include/bits/shared_ptr_base.h (__shared_count::_S_create_from_up):
	Handle unique_ptr for arrays or with custom pointer types.
	(__shared_ptr::__shared_ptr(unique_ptr<_Tp1, _Del>&&): Likewise.
	* include/bits/unique_ptr.h (unique_ptr<_Tp[], _Dp>): Use
	_Dp::pointer if defined. Implement proposed resolution of LWG 2118.
	* testsuite/20_util/shared_ptr/cons/unique_ptr_array.cc: New.
	* testsuite/20_util/unique_ptr/assign/cv_qual.cc: New.
	* testsuite/20_util/unique_ptr/cons/array_convertible_neg.cc: New.
	* testsuite/20_util/unique_ptr/cons/convertible_neg.cc: New.
	* testsuite/20_util/unique_ptr/cons/cv_qual.cc: New.
	* testsuite/20_util/unique_ptr/modifiers/cv_qual.cc: New.
	* testsuite/20_util/unique_ptr/requirements/pointer_type_array.cc: New.
	* testsuite/20_util/shared_ptr/cons/unique_ptr.cc: Adjust comments.
	* testsuite/20_util/unique_ptr/cons/pointer_array_convertible_neg.cc:
	Likewise.
	* testsuite/20_util/unique_ptr/requirements/pointer_type.cc: Likewise.
	* testsuite/20_util/bind/ref_neg.cc: Adjust dg-error line number.
	* testsuite/20_util/declval/requirements/1_neg.cc: Likewise.
	* testsuite/20_util/default_delete/48631_neg.cc: Likewise.
	* testsuite/20_util/shared_ptr/cons/43820_neg.cc: Likewise.
	* testsuite/20_util/unique_ptr/assign/48635_neg.cc: Likewise.
	* testsuite/20_util/unique_ptr/modifiers/reset_neg.cc: Adjust
	dg-error text.
	* testsuite/20_util/unique_ptr/cons/ptr_deleter_neg.cc: Use
	different instantiations so static_assert fails for each.

From-SVN: r194651
2012-12-20 21:02:33 +00:00
Jonathan Wakely 5f2862cf63 thread.cc (execute_native_thread_routine): Do not swallow __forced_unwind exceptions.
* src/c++11/thread.cc (execute_native_thread_routine): Do not swallow
	__forced_unwind exceptions.
	* testsuite/30_threads/thread/native_handle/cancel.cc: New.

From-SVN: r194539
2012-12-16 20:52:47 +00:00
Steve Ellcey 2993114da5 3.cc: Shrink memory usage under simulator.
2012-12-14  Steve Ellcey  <sellcey@mips.com>

	* testsuite/21_strings/basic_string/append/wchar_t/3.cc: Shrink
	memory usage under simulator.
	* testsuite/21_strings/basic_string/cons/wchar_t/6.cc: Ditto.
	* testsuite/21_strings/basic_string/inserters_extractors/wchar_t/10.cc:
	Ditto.
	* testsuite/21_strings/basic_string/inserters_extractors/wchar_t/11.cc:
	Ditto.

From-SVN: r194510
2012-12-14 22:03:40 +00:00
Steve Ellcey 01f4c82194 18654.cc: Shrink memory usage under simulator.
2012-12-13  Steve Ellcey  <sellcey@mips.com>

	* testsuite/21_strings/basic_string/capacity/char/18654.cc: Shrink
	memory usage under simulator.
	* testsuite/21_strings/basic_string/capacity/wchar_t/18654.cc: Ditto.
	* testsuite/22_locale/collate/transform/char/28277.cc: Ditto.
	* testsuite/22_locale/collate/transform/wchar_t/28277.cc: Ditto.

From-SVN: r194488
2012-12-13 19:55:13 +00:00
Andreas Schwab 9ddad47136 libstdc++.exp (dg-test): Unset testname_with_flags after running the test.
* testsuite/lib/libstdc++.exp (dg-test): Unset testname_with_flags
after running the test.

From-SVN: r194330
2012-12-09 14:31:27 +00:00
John David Anglin 27ba7cea69 re PR libstdc++/55503 (FAIL: 30_threads/condition_variable/members/53841.cc (test for excess errors))
PR libstdc++/55503
	* testsuite/30_threads/condition_variable/members/53841.cc: Add
	hppa*-hp-hpux11* to -pthread dg-options.

From-SVN: r194021
2012-12-01 18:25:11 +00:00
Andrew Pinski 5d99894e65 re PR other/54279 (first stage build with g++ fails with "." as the first component of $PATH)
2012-11-28  Andrew Pinski  <apinski@cavium.com>

        PR bootstrap/54279
        * configure.ac (CXX_FOR_TARGET): Change over to use xg++.
        * configure: Regenerate.
        * Makefile.tpl (POSTSTAGE1_CXX_EXPORT): Change over to use xg++.
        * Makefile.in: Regenerate.

2012-11-28  Andrew Pinski  <apinski@cavium.com>

        PR bootstrap/54279
        * Makefile.in (${QMTEST_DIR}/context): Use xg++ instead of g++.

2012-11-28  Andrew Pinski  <apinski@cavium.com>

        PR bootstrap/54279
        * Make-lang.in (g++$(exeext)): Rename to
        (xg++$(exeext)): This.
        (g++-cross$(exeext)): Use xg++$(exeext) instead of g++$(exeext).
        (c++.start.encap): Likewise.
        (c++.install-common): Likewise.

2012-11-28  Andrew Pinski  <apinski@cavium.com>

        PR bootstrap/54279
        * lib/g++.exp (g++_init): Search for xg++ instead of g++ in the build
        directories.
        * lib/obj-c++.exp (obj-c++_init): Likewise.

2012-11-28  Andrew Pinski  <apinski@cavium.com>

        PR bootstrap/54279
        * scripts/testsuite_flags.in (--build-cxx): Use xg++ instead of g++.
        * testsuite/lib/libstdc++.exp (libstdc++_init): Likewise.

From-SVN: r193910
2012-11-28 14:11:29 -08:00
Jonathan Wakely b1c2b51b66 functional (_Mem_fn): Constrain function call operators to avoid ambiguities.
* include/std/functional (_Mem_fn): Constrain function call operators
	to avoid ambiguities. Use perfect forwarding.
	* testsuite/20_util/function_objects/mem_fn/55463.cc: Additional
	tests.
	* testsuite/20_util/function_objects/mem_fn/forward.cc: New.
	* testsuite/20_util/bind/ref_neg.cc: Adjust dg-error line numbers.

From-SVN: r193879
2012-11-28 01:42:25 +00:00
Jonathan Wakely 5127244e4b re PR libstdc++/55463 (Result of std::mem_fn doesn't accept rvalues)
PR libstdc++/55463
	* include/std/functional (_Mem_fn): Handle rvalue objects. Add
	noexcept-specifications.
	* testsuite/20_util/function_objects/mem_fn/55463.cc: New.
	* testsuite/20_util/bind/ref_neg.cc: Adjust dg-error line numbers.

From-SVN: r193831
2012-11-26 23:53:29 +00:00
Jonathan Wakely aa66b299c8 re PR libstdc++/52680 (std::this_thread::sleep_for #ifdef'd out by _GLIBCXX_USE_NANOSLEEP)
PR libstdc++/52680
	* acinclude.m4 (GLIBCXX_ENABLE_LIBSTDCXX_TIME): Check for usleep and
	sleep if nanosleep is not available. Bump libtool revision.
	* config.h.in: Regenerate.
	* configure: Likewise.
	* config/abi/pre/gnu.ver (GLIBCXX_3.4.18): Add __sleep_for.
	* include/std/thread (this_thread::__sleep_for): Add.
	(this_thread::yield, this_thread::sleep_until, this_thread::sleep_for):
	Declare unconditionally.
	* src/c++11/thread.cc (this_thread::__sleep_for): Define.
	* testsuite/lib/libstdc++.exp (check_v3_target_nanosleep): Rename to
	check_v3_target_sleep.
	* testsuite/lib/dg-options.exp (dg-require-nanosleep): Rename to
	dg-require-sleep.
	* testsuite/30_threads/condition_variable_any/53830.cc: Update.
	* testsuite/30_threads/this_thread/2.cc: Likewise.
	* testsuite/30_threads/this_thread/3.cc: Likewise.
	* testsuite/30_threads/this_thread/4.cc: Likewise.
	* testsuite/30_threads/async/54297.cc: Likewise.

From-SVN: r193769
2012-11-23 22:11:23 +00:00
Paolo Carlini 25caa91e99 re PR libstdc++/55413 ([LTO] hashtable.h:1648 '__bbegin_bkt' may be used uninitialized in this function [-Werror=maybe-uninitialized])
2012-11-20  Paolo Carlini  <paolo.carlini@oracle.com>

	PR libstdc++/55413
	* include/bits/hashtable.h (_Hashtable<>::_M_rehash_aux): Initialize
	__bbegin_bkt and __prev_bkt to avoid uninitialized warnings.
	* testsuite/23_containers/unordered_set/instantiation_neg.cc: Adjust
	dg-error line number.

From-SVN: r193663
2012-11-20 14:54:11 +00:00