Commit Graph

2962 Commits

Author SHA1 Message Date
Tony Wang 31879c2cc7 62154.cc: Disable when the target doesn't provide atomic builtins.
2014-08-21  Tony Wang  <tony.wang@arm.com>

    libstdc++-v3/
    * testsuite/18_support/nested_exception/62154.cc: Disable when the
    target doesn't provide atomic builtins.

From-SVN: r214261
2014-08-21 09:11:00 +00:00
Jonathan Wakely 2ce8cb99a6 re PR libstdc++/62154 (std::throw_with_nested should not require a polymorphic type)
PR libstdc++/62154
	* libsupc++/nested_exception.h (throw_with_nested, rethrow_if_nested):
	Rewrite to conform to C++11 requirements.
	* testsuite/18_support/nested_exception/62154.cc: New.

From-SVN: r214025
2014-08-15 16:22:44 +01:00
Paolo Carlini 215acd2bae parser.c (cp_parser_init_declarator): Remove redundant check of decl_specifiers->type.
/gcc/cp
2014-08-14  Paolo Carlini  <paolo.carlini@oracle.com>

	* parser.c (cp_parser_init_declarator): Remove redundant check of
	decl_specifiers->type.

/gcc/testsuite
2014-08-14  Paolo Carlini  <paolo.carlini@oracle.com>

	* g++.dg/cpp0x/alias-decl-4.C: Adjust for parser change.
	* g++.dg/cpp0x/decltype2.C: Likewise.
	* g++.dg/cpp0x/decltype3.C: Likewise.
	* g++.dg/cpp0x/pr60249.C: Likewise.
	* g++.dg/cpp0x/variadic-ex10.C: Likewise.
	* g++.dg/cpp0x/variadic-ex14.C: Likewise.
	* g++.dg/cpp0x/variadic2.C: Likewise.
	* g++.dg/cpp0x/variadic74.C: Likewise.
	* g++.dg/parse/error10.C: Likewise.
	* g++.dg/parse/error15.C: Likewise.
	* g++.dg/parse/error2.C: Likewise.
	* g++.dg/template/crash106.C: Likewise.
	* g++.dg/template/crash89.C: Likewise.
	* g++.dg/template/nontype7.C: Likewise.
	* g++.dg/template/void3.C: Likewise.
	* g++.dg/template/void7.C: Likewise.

/libstdc++-v3
2014-08-14  Paolo Carlini  <paolo.carlini@oracle.com>

	* testsuite/26_numerics/random/linear_congruential_engine/
	requirements/non_uint_neg.cc: Adjust for parser change.
	* testsuite/tr1/5_numerical_facilities/random/linear_congruential/
	requirements/non_uint_neg.cc: Likewise.

From-SVN: r213952
2014-08-14 09:15:11 +00:00
Jonathan Wakely 191736612d basic_string.h (getline): Qualify call to prevent ADL and add overloads for rvalue streams.
* include/bits/basic_string.h (getline): Qualify call to prevent ADL
	and add overloads for rvalue streams.
	* testsuite/21_strings/basic_string/inserters_extractors/char/12.cc:
	New.
	* testsuite/21_strings/basic_string/inserters_extractors/wchar_t/12.cc:
	New.

From-SVN: r213869
2014-08-12 16:19:53 +01:00
Ulrich Drepper 83a4216dd2 random.tcc (uniform_on_sphere_helper): Define.
* include/ext/random.tcc (uniform_on_sphere_helper): Define.
        (uniform_on_sphere_distribution::operator()): Use the new helper
        class for the implementation.

        * testsuite/ext/random/uniform_on_sphere_distribution/operators/
        equal.cc: Remove bogus part of comment.
        * testsuite/ext/random/uniform_on_sphere_distribution/operators/
        inequal.cc: Likewise.
        * testsuite/ext/random/uniform_on_sphere_distribution/operators/
        serialize.cc: Add check to verify result of serialzation and
        deserialization.
        * testsuite/ext/random/uniform_on_sphere_distribution/operators/
        generate.cc: New file.

From-SVN: r213779
2014-08-09 17:56:57 +00:00
François Dumont 013078982d re PR libstdc++/61667 (setting max_load_factor of unordered_map cause buckets shrink)
2014-08-09  François Dumont  <fdumont@gcc.gnu.org>

	PR libstdc++/61667
	* include/bits/hashtable.h (_Hashtable<>::__rehash_policy): Use
	_M_need_rehash to initialize the rehash policy and check if a rehash is
	needed.
	* testsuite/23_containers/unordered_map/modifiers/61667.cc: New.

From-SVN: r213775
2014-08-09 08:00:59 +00:00
Jonathan Wakely d0ef19a0b2 stl_list.h (_List_base::_List_base(_List_base&&)): Optimize.
* include/bits/stl_list.h (_List_base::_List_base(_List_base&&)):
	Optimize.
	* testsuite/23_containers/list/requirements/dr438/assign_neg.cc:
	Adjust dg-error line number.
	* testsuite/23_containers/list/requirements/dr438/constructor_1_neg.cc:
	Likewise.
	* testsuite/23_containers/list/requirements/dr438/constructor_2_neg.cc:
	Likewise.
	* testsuite/23_containers/list/requirements/dr438/insert_neg.cc:
	Likewise.

From-SVN: r213716
2014-08-07 18:25:13 +01:00
Paolo Carlini 2821a748d1 re PR c++/15339 ([DR217] Adding default arguments to function templates in redeclarations should be forbidden)
2014-08-02  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/15339
	* testsuite/26_numerics/headers/complex/synopsis.cc: Fix.

From-SVN: r213520
2014-08-02 21:38:34 +00:00
François Dumont 5c7c5f9a88 2014-07-29 François Dumont <fdumont@gcc.gnu.org>
* testsuite/util/testsuite_allocator.h
	(tracker_allocator_counter::allocate): Remove new invocation, only
	collect information.
	(tracker_allocator_counter::deallocate): Remove delete invocation, only
	collect information.
	(check_inconsistent_alloc_value_type): New.
	(tracker_allocator): Transform as a facade for any allocator type.
	(uneq_allocator): Likewise.
	(propagating_allocator): Likewise.
	* testsuite/23_containers/forward_list/debug/move_assign_neg.cc: Use an
	explicitly non propagating allocator.
	* testsuite/23_containers/map/debug/move_assign_neg.cc: Likewise.
	* testsuite/23_containers/multimap/debug/move_assign_neg.cc: likewise.
	* testsuite/23_containers/multiset/debug/move_assign_neg.cc: Likewise.
	* testsuite/23_containers/set/debug/move_assign_neg.cc: Likewise.
	* testsuite/23_containers/unordered_map/debug/move_assign_neg.cc:
	Likewise.
	* testsuite/23_containers/unordered_multimap/debug/move_assign_neg.cc:
	Likewise.
	* testsuite/23_containers/unordered_multiset/debug/move_assign_neg.cc:
	Likewise.
	* testsuite/23_containers/unordered_set/debug/move_assign_neg.cc:
	Likewise.
	* testsuite/23_containers/vector/debug/move_assign_neg.cc: Likewise.

From-SVN: r213224
2014-07-29 19:47:19 +00:00
Jonathan Wakely f4081d133f re PR libstdc++/61947 (Ambiguous calls when constructing std::tuple)
PR libstdc++/61947
	* include/std/tuple (_Head_base): Use allocator_arg_t parameters to
	disambiguate unary constructors.
	(_Tuple_impl): Pass allocator_arg_t arguments.
	* testsuite/20_util/tuple/61947.cc: New.
	* testsuite/20_util/uses_allocator/cons_neg.cc: Adjust dg-error line.

From-SVN: r213221
2014-07-29 18:30:34 +01:00
Jonathan Wakely aec20dcf39 re PR libstdc++/61946 (rope construction, passing allocator referenct without const)
PR libstdc++/61946
	* include/ext/rope (rope::rope(char_producer<_CharT>*, size_t, bool,
	const allocator_type&)): Pass non-const allocator to
	_S_new_RopeFunction.
	* testsuite/ext/rope/61946.cc: New.

From-SVN: r213220
2014-07-29 18:30:25 +01:00
Ed Smith-Rowland 1c4ff014fe PR libstdc++/60037 - SIGFPE in std::generate_canonical<unsigned int...>
2014-07-29  Ed Smith-Rowland  <3dw4rd@verizon.net>

	PR libstdc++/60037 - SIGFPE in std::generate_canonical<unsigned int...>
	* include/bits/random.h (_Adaptor): static_assert for non floating-point
	result type.
	* include/bits/random.tcc (generate_canonical): Ditto.
	* include/ext/random.tcc (hypergeometric_distribution::operator()):
	Use double as a rng result type.
	* testsuite/26_numerics/random/pr60037-neg.cc: New.
	* testsuite/ext/random/hypergeometric_distribution/pr60037.cc: New.

From-SVN: r213207
2014-07-29 14:56:45 +00:00
Jonathan Wakely 6f440cceb4 printers.py (SingleObjContainerPrinter): New base class for experimental::any and experimental::optional printers.
* python/libstdcxx/v6/printers.py (SingleObjContainerPrinter): New
	base class for experimental::any and experimental::optional printers.
	(StdExpAnyPrinter, StdExpOptionalPrinter, StdExpStringViewPrinter):
	New printers for Fundamentals TS types.
	* testsuite/libstdc++-prettyprinters/libfundts.cc: New.

From-SVN: r212556
2014-07-15 13:00:18 +01:00
Jonathan Wakely 077aa95ec7 printers.py (TemplateTypePrinter): Add type printer for class templates.
* python/libstdcxx/v6/printers.py (TemplateTypePrinter): Add type
	printer for class templates.
	(register_type_printers): Use TemplateTypePrinter for containers
	and other class templates with default template arguments.
	* testsuite/libstdc++-prettyprinters/whatis.cc: Test new recognizers.

From-SVN: r212555
2014-07-15 13:00:12 +01:00
Tim Shen 4228f9328c re PR libstdc++/61720 (std::regex_search matches incorrectly)
PR libstdc++/61720
	* include/bits/regex_executor.tcc (_Executor<>::_M_main_dispatch):
	Clear match queue for next use.
	* testsuite/28_regex/algorithms/regex_search/61720.cc: New file.

From-SVN: r212539
2014-07-15 04:28:51 +00:00
Ulrich Drepper 863a2c7ecc random: Add uniform_on_sphere_distribution definition.
2014-07-12  Ulrich Drepper  <drepper@gmail.com>

	* include/ext/random: Add uniform_on_sphere_distribution definition.
	* include/ext/random.tcc: Add out-of-band member function definitions
	for uniform_on_sphere_distribution.
	* testsuite/ext/random/uniform_on_sphere_distribution/
	cons/default.cc: New file.
	* testsuite/ext/random/uniform_on_sphere_distribution/
	operators/equal.cc: New file.
	* testsuite/ext/random/uniform_on_sphere_distribution/
	operators/inequal.cc: New file.
	* testsuite/ext/random/uniform_on_sphere_distribution/
	operators/serialize.cc: New file.

From-SVN: r212492
2014-07-13 11:07:44 +00:00
Edward Smith-Rowland 8daac7749f Add the logistic_distribution as an extension.
2014-07-11  Edward Smith-Rowland  <3dw4rd@verizon.net>

	Add the logistic_distribution as an extension.
	* include/ext/random: Add the logistic_distribution.
	* include/ext/random.tcc: Add the logistic_distribution.
	* testsuite/ext/random/logistic_distribution/cons/parms.cc: New.
	* testsuite/ext/random/logistic_distribution/cons/default.cc: New.
	* testsuite/ext/random/logistic_distribution/requirements/typedefs.cc:
	New.
	* testsuite/ext/random/logistic_distribution/operators/inequal.cc: New.
	* testsuite/ext/random/logistic_distribution/operators/equal.cc: New.
	* testsuite/ext/random/logistic_distribution/operators/serialize.cc:
	New.

From-SVN: r212476
2014-07-12 01:32:20 +00:00
Samuel Bronson f4da031c41 gdb-test.exp (gdb-test): Turn off GDB's auto-load, list loaded libs.
2014-07-11  Samuel Bronson  <naesten@gmail.com>

	* testsuite/lib/gdb-test.exp (gdb-test): Turn off GDB's auto-load,
	list loaded libs.

From-SVN: r212459
2014-07-11 16:32:29 +01:00
Samuel Bronson 7cd41cda09 libstdc++.exp (libstdc++_init): Set $GCC_COLORS="" instead of insisting that GCC understand...
2014-07-11  Samuel Bronson  <naesten@gmail.com>

	* testsuite/lib/libstdc++.exp  (libstdc++_init): Set $GCC_COLORS=""
	instead of insisting that GCC understand -fdiagnostics-color=never

From-SVN: r212458
2014-07-11 16:32:14 +01:00
Samuel Bronson cdd1ba6210 re PR libstdc++/58962 (Pretty printers use obsolete Python syntax)
2014-07-11  Samuel Bronson  <naesten@gmail.com>
	    Matthias Klose  <doko@ubuntu.com>

	PR libstdc++/58962
	* python/libstdcxx/v6/printers.py: Port to Python 2+3
	(imap): New compat function.
	(izip): Likewise.
	(Iterator): New mixin to allow writing iterators in Python 3 style
	regardless of which version we're running on.
	[Python3] (long) New compat alias for "int".
	* testsuite/lib/gdb-test.exp: Port to Python 2+3 (print syntax)

Co-Authored-By: Matthias Klose <doko@ubuntu.com>

From-SVN: r212453
2014-07-11 14:43:07 +01:00
Jonathan Wakely 7757d79bfc any (any::_Manager_alloc::_Data): Reorder tuple members to simplify pretty printing.
* include/experimental/any (any::_Manager_alloc::_Data): Reorder
	tuple members to simplify pretty printing.
	(any::_Manager_alloc::_Data::_M_construct): Fix uses-allocator
	construction.
	* testsuite/experimental/any/cons/4.cc: New.

From-SVN: r212435
2014-07-10 19:08:35 +01:00
Jonathan Wakely b3771d3f6f allocated_ptr.h (__allocated_ptr::operator=): Add missing return.
* include/bits/allocated_ptr.h (__allocated_ptr::operator=): Add
	missing return.
	* include/experimental/any: Remove unused header.
	* include/std/functional (_Maybe_wrap_member_pointer): Fix comments.
	* testsuite/experimental/any/misc/any_cast_neg.cc: Adjust dg-error.
	* testsuite/util/testsuite_regex.h: Move include guard.

From-SVN: r212360
2014-07-08 14:22:14 +01:00
Tim Shen 5bcb66dffa re PR testsuite/61061 (FAIL: g++.dg/inherit/covariant7.C)
PR libstdc++/61061
	PR libstdc++/61582
	* include/bits/regex_automaton.h (_NFA<>::_M_insert_state): Add
	a NFA state limit. If it's exceeded, regex_constants::error_space
	will be throwed.
	* include/bits/regex_automaton.tcc (_StateSeq<>::_M_clone): Use
	map (which is sparse) instead of vector. This reduce n times clones'
	cost from O(n^2) to O(n).
	* include/std/regex: Add map dependency.
	* testsuite/28_regex/algorithms/regex_match/ecma/char/61601.cc: New
	testcase.

From-SVN: r212185
2014-07-01 03:05:45 +00:00
Tim Shen ad9ec7b3c5 re PR libstdc++/61424 (std::regex matches right to left, not leftmost longest)
PR libstdc++/61424
	* include/bits/regex.tcc (__regex_algo_impl<>): Use DFS for ECMAScript,
	not just regex containing back-references.
	* include/bits/regex_compiler.tcc (_Compiler<>::_M_disjunction):
	exchange _M_next and _M_alt for alternative operator,
	making matching from left to right.
	* include/bits/regex_executor.h (_State_info<>::_M_get_sol_pos):
	Add position tracking fom DFS.
	* include/bits/regex_executor.tcc (_Executor<>::_M_main_dispatch,
	_Executor<>::_M_dfs): Likewise.
	* include/bits/regex_scanner.h: Remove unused enum entry.
	* testsuite/28_regex/algorithms/regex_search/61424.cc: New
	testcase from PR.

From-SVN: r212184
2014-07-01 02:10:31 +00:00
Paolo Carlini 8274b28187 2014-06-27 Paolo Carlini <paolo.carlini@oracle.com>
* Revert r212046 and r212054.

From-SVN: r212085
2014-06-27 20:03:26 +00:00
François Dumont 73fb65f998 Fix a comment.
From-SVN: r212054
2014-06-26 20:44:46 +00:00
François Dumont b3fb198ded 2014-06-26 François Dumont <fdumont@gcc.gnu.org>
* testsuite/util/testsuite_allocator.h
	(tracker_allocator_counter::allocate): Remove new invocation, only
	collect information.
	(tracker_allocator_counter::deallocate): Remove delete invocation, only
	collect information.
	(check_inconsistent_alloc_value_type): New.
	(tracker_allocator): Transform as a facade for any allocator type.
	(uneq_allocator): Likewise.
	(propagating_allocator): Likewise.
	* testsuite/23_containers/forward_list/debug/move_assign_neg.cc: Use an
	explicitly non propagating allocator.
	* testsuite/23_containers/map/debug/move_assign_neg.cc: Likewise.
	* testsuite/23_containers/multimap/debug/move_assign_neg.cc: likewise.
	* testsuite/23_containers/multiset/debug/move_assign_neg.cc: Likewise.
	* testsuite/23_containers/set/debug/move_assign_neg.cc: Likewise.
	* testsuite/23_containers/unordered_map/debug/move_assign_neg.cc:
	Likewise.
	* testsuite/23_containers/unordered_multimap/debug/move_assign_neg.cc:
	Likewise.
	* testsuite/23_containers/unordered_multiset/debug/move_assign_neg.cc:
	Likewise.
	* testsuite/23_containers/unordered_set/debug/move_assign_neg.cc:
	Likewise.
	* testsuite/23_containers/vector/debug/move_assign_neg.cc: Likewise.

From-SVN: r212046
2014-06-26 18:42:41 +00:00
Jonathan Wakely 6ab0d680e7 alloc.cc: Fix use of test allocator.
* testsuite/20_util/shared_ptr/creation/alloc.cc: Fix use of test
	allocator.
	* testsuite/20_util/shared_ptr/creation/no_rtti.cc: Likewise.
	* testsuite/30_threads/promise/cons/alloc.cc: Likewise.

From-SVN: r212003
2014-06-26 00:05:58 +01:00
Jonathan Wakely b925bf594a Makefile.am: Add new header.
* include/Makefile.am: Add new header.
	* include/Makefile.in: Regenerate.
	* include/bits/allocated_ptr.h (__allocated_ptr, __allocate_guarded):
	New RAII utilities for working with allocators.
	* include/bits/shared_ptr_base.h (_Sp_counted_deleter): Define
	__allocator_type typedef and use new __allocated_ptr type.
	(_Sp_counted_ptr_inplace): Likewise.
	(__shared_count::__shared_count, __shared_ptr::__shared_ptr): Use
	__allocate_guarded to to simplify exception handling.
	* include/experimental/any (any::_Manager_alloc::_S_alloc): Likewise.
	* include/std/future (_Result_alloc::_M_destroy): Likewise.
	(_Result_alloc::_S_allocate_result): Likewise.
	* testsuite/20_util/shared_ptr/cons/43820_neg.cc: Adjust line number.
	* testsuite/20_util/shared_ptr/cons/void_neg.cc: Likewise.
	* testsuite/20_util/shared_ptr/creation/no_rtti.cc: New.
	* testsuite/20_util/shared_ptr/creation/alloc.cc: Test allocator
	with fancy pointer.
	* testsuite/30_threads/promise/cons/alloc.cc: Likewise.

From-SVN: r211996
2014-06-25 21:54:46 +01:00
Jonathan Wakely 7ce56fc845 any (any_v1): Rename namespace to fundamentals_v1.
* include/experimental/any (any_v1): Rename namespace to
	fundamentals_v1. Change string returned by bad_any_cast::what().
	* include/experimental/optional (fundamentals_v1): Add namespace.
	* include/experimental/string_view (fundamentals_v1): Likewise.
	* testsuite/experimental/any/typedefs.cc: New.
	* testsuite/experimental/optional/typedefs.cc: New.
	* testsuite/experimental/string_view/typedefs.cc: New.

From-SVN: r211920
2014-06-23 23:12:31 +01:00
Jonathan Wakely bb85ec6e3a re PR libstdc++/61532 (make_signed and make_unsigned wchar_t have started failing in the libstdc++ testsuite.)
PR libstdc++/61532
	* testsuite/20_util/make_signed/requirements/typedefs-1.cc: Do not
	apply the signed specifier to wchar_t.
	* testsuite/20_util/make_signed/requirements/typedefs-2.cc: Likewise.
	* testsuite/20_util/make_unsigned/requirements/typedefs-1.cc: Check
	cv-qualifier and size.
	* testsuite/20_util/make_unsigned/requirements/typedefs-2.cc:
	Likewise.

From-SVN: r211909
2014-06-23 19:17:03 +01:00
Jonathan Wakely 83387bbd28 parse_numbers.h (_Number_help): Fix divide-by-zero.
* include/bits/parse_numbers.h (_Number_help): Fix divide-by-zero.
	* include/std/chrono (_Checked_integral_constant): Allow zero.
	* testsuite/20_util/duration/literals/values.cc: Test non-positive
	values and digit separators.

From-SVN: r211890
2014-06-23 12:30:32 +01:00
Jonathan Wakely e8043fa674 status_cxx2014.xml: Update Fundamentals TS status.
* doc/xml/manual/status_cxx2014.xml: Update Fundamentals TS status.
	* include/Makefile.am: Add new header.
	* include/Makefile.in: Regenerate.
	* include/experimental/any: New.
	* include/ext/aligned_buffer.h (__aligned_buffer(nullptr_t)): New
	constructor.
	* testsuite/experimental/any/assign/1.cc: New.
	* testsuite/experimental/any/assign/2.cc: New.
	* testsuite/experimental/any/cons/1.cc: New.
	* testsuite/experimental/any/cons/2.cc: New.
	* testsuite/experimental/any/cons/3.cc: New.
	* testsuite/experimental/any/misc/any_cast.cc: New.
	* testsuite/experimental/any/misc/any_cast_neg.cc: New.
	* testsuite/experimental/any/misc/any_cast_no_rtti.cc: New.
	* testsuite/experimental/any/misc/swap.cc: New.
	* testsuite/experimental/any/modifiers/1.cc: New.
	* testsuite/experimental/any/observers/type.cc: New.

From-SVN: r211669
2014-06-14 17:00:56 +01:00
Maciej W. Rozycki 58170a6621 4402.cc (test02): Use `wcout' rather than `cout'.
* testsuite/27_io/basic_ostream/inserters_arithmetic/wchar_t/4402.cc
	(test02) [TEST_NUMPUT_VERBOSE]: Use `wcout' rather than `cout'.

From-SVN: r211433
2014-06-11 00:20:45 +00:00
Jonathan Wakely 060269c481 re PR libstdc++/61390 (error in nested template parameter in ext/pb_ds header file)
PR libstdc++/61390
	* include/ext/pb_ds/detail/bin_search_tree_/traits.hpp
	(bin_search_tree_traits): Do not redeclare template-parameters.
	* testsuite/util/testsuite_iterators.h (test_container): Likewise.

From-SVN: r211421
2014-06-10 19:09:18 +01:00
Ed Smith-Rowland 25608e3a5f DR 2344 - std::quoted doesn't respect padding
2014-06-06  Ed Smith-Rowland  <3dw4rd@verizon.net>

	DR 2344 - std::quoted doesn't respect padding
	* include/std/iomanip: Allow for padding in quoted inserters.
	* testsuite/27_io/manipulators/standard/char/dr2344.cc: New.
	* testsuite/27_io/manipulators/standard/wchar_t/dr2344.cc: New.

From-SVN: r211340
2014-06-07 03:40:30 +00:00
François Dumont 4ac2509b1d 1.cc: Simplify test.
2014-06-06  François Dumont  <fdumont@gcc.gnu.org>

	* testsuite/23_containers/map/operators/1.cc: Simplify test.

From-SVN: r211324
2014-06-06 20:18:24 +00:00
Paolo Carlini 3c61a5ba37 DR 1423 PR c++/52174
gcc/cp
2014-06-03  Paolo Carlini  <paolo.carlini@oracle.com>

	DR 1423
	PR c++/52174
	* call.c (standard_conversion): Convert nullptr to bool only
	in case of direct-initialization.
	(convert_like_real): Provide informative error message.

gcc/testsuite
2014-06-03  Paolo Carlini  <paolo.carlini@oracle.com>

	DR 1423
	PR c++/52174
	* g++.dg/cpp0x/nullptr31.C: New.
	* g++.dg/cpp0x/sfinae-nullptr1.C: Likewise.
	* g++.dg/cpp0x/nullptr17.C: Update.

libstdc++-v3
2014-06-03  Paolo Carlini  <paolo.carlini@oracle.com>

	DR 1423
	PR c++/52174
	* testsuite/20_util/is_assignable/value.cc: Update.

From-SVN: r211195
2014-06-03 17:48:36 +00:00
Jonathan Wakely 097f0bcf65 regex_compiler.h (__detail::_BracketMatcher): Reorder members to avoid wasted space when not using a cache.
* include/bits/regex_compiler.h (__detail::_BracketMatcher): Reorder
	members to avoid wasted space when not using a cache.
	(__detail::_BracketMatcher::_M_ready()): Sort and deduplicate set.
	* include/bits/regex_compiler.tcc
	(__detail::_BracketMatcher::_M_apply(_CharT, false_type)): Use binary
	search on set.
	* include/bits/regex_executor.h (__detail::_Executor::_Match_mode):
	New enumeration type to indicate match mode.
	(__detail::_Executor::_State_info): New type holding members only
	needed in BFS-mode. Replace unique_ptr<vector<bool>> with
	unique_ptr<bool[]>.
	(__detail::_Executor::_M_rep_once_more, __detail::_Executor::_M_dfs):
	Replace template parameter with run-time function parameter.
	(__detail::_Executor::_M_main): Likewise. Dispatch to ...
	(__detail::_Executor::_M_main_dispatch): New overloaded functions to
	implement DFS and BFS mode.
	* include/bits/regex_executor.tcc (__detail::_Executor::_M_main):
	Split implementation into ...
	(__detail::_Executor::_M_main_dispatch): New overloaded functions.
	(__detail::_Executor::_M_lookahead): Create nested executor on stack.
	(__detail::_Executor::_M_rep_once_more): Pass match mode as function
	argument instead of template argument.
	(__detail::_Executor::_M_dfs): Likewise.
	* include/bits/regex_scanner.tcc: Fix typos in comments.
	* testsuite/performance/28_regex/range.cc: New.

From-SVN: r211143
2014-06-02 20:36:14 +01:00
Jonathan Wakely 315eb4bb08 condition_variable (condition_variable_any::_Unlock): Do not swallow __forced_unwind.
* include/std/condition_variable (condition_variable_any::_Unlock): Do
	not swallow __forced_unwind.
	* include/std/future (__future_base::_Task_setter): Likewise.
	(__future_base::_Async_state_impl): Turn __forced_unwind into broken
	promise and rethrow.
	* include/std/mutex (try_lock): Likewise.
	* testsuite/30_threads/async/forced_unwind.cc: New.
	* testsuite/30_threads/packaged_task/forced_unwind.cc: New.

From-SVN: r211138
2014-06-02 16:45:09 +01:00
Rüdiger Sonderfeld d371802725 type_traits (__strictest_alignment): New helper struct.
2014-06-02  Rüdiger Sonderfeld  <ruediger@c-plusplus.de>
	    Jonathan Wakely  <jwakely@redhat.com>

	* libstdc++-v3/include/std/type_traits (__strictest_alignment): New
	helper struct.
	(aligned_union): New struct (C++11).
	(aligned_union_t): New type alias (C++14).
	* doc/xml/manual/status_cxx2011.xml: Update.
	* libstdc++-v3/testsuite/20_util/aligned_union/1.cc: New file.
	* testsuite/20_util/declval/requirements/1_neg.cc: Adjust dg-error
	line number.

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

From-SVN: r211137
2014-06-02 14:55:14 +01:00
Jonathan Wakely 16545743c6 re PR libstdc++/61374 (string_view::operator string() is buggy)
PR libstdc++/61374
	* include/experimental/string_view (operator basic_string): Correct
	order of arguments.
	(to_string): Replace with member function.
	Add inline specifiers. Remove unused header. Remove _S_empty_rep and
	allow _M_str to be null.
	* testsuite/experimental/string_view/cons/char/1.cc: Adjust to new
	default constructor semantics.
	* testsuite/experimental/string_view/cons/wchar_t/1.cc: Likewise.
	* testsuite/experimental/string_view/operations/copy/char/1.cc: Fix
	copyright dates. Remove unused header.
	* testsuite/experimental/string_view/operations/copy/wchar_t/1.cc:
	Likewise.
	* testsuite/experimental/string_view/operations/data/char/1.cc:
	Fix copyright dates. Adjust to new default constructor semantics.
	* testsuite/experimental/string_view/operations/data/wchar_t/1.cc:
	Likewise.
	* testsuite/experimental/string_view/operations/to_string/1.cc: New.

From-SVN: r211113
2014-06-01 18:23:41 +01:00
Jonathan Wakely 29f0952140 libstdc++.exp (libstdc++_init): Adjust regexp to work with previous versions of Tcl.
* testsuite/lib/libstdc++.exp (libstdc++_init): Adjust regexp to
	work with previous versions of Tcl.

From-SVN: r211077
2014-05-30 12:11:15 +01:00
Jonathan Wakely cfbe41d07e 54297.cc: Remove duplicate dragonfly selector.
* testsuite/30_threads/async/54297.cc: Remove duplicate dragonfly
	selector.
	* testsuite/30_threads/call_once/60497.cc: Likewise.
	* testsuite/30_threads/condition_variable/54185.cc: Likewise.
	* testsuite/30_threads/condition_variable_any/53830.cc: Likewise.
	* testsuite/30_threads/packaged_task/60564.cc: Likewise.
	* testsuite/30_threads/packaged_task/cons/56492.cc: Likewise.
	* testsuite/30_threads/promise/60966.cc: Likewise.
	* testsuite/30_threads/shared_lock/cons/1.cc: Likewise.
	* testsuite/30_threads/shared_lock/cons/2.cc: Likewise.
	* testsuite/30_threads/shared_lock/cons/3.cc: Likewise.
	* testsuite/30_threads/shared_lock/cons/4.cc: Likewise.
	* testsuite/30_threads/shared_lock/cons/5.cc: Likewise.
	* testsuite/30_threads/shared_lock/cons/6.cc: Likewise.
	* testsuite/30_threads/shared_lock/locking/1.cc: Likewise.
	* testsuite/30_threads/shared_lock/locking/2.cc: Likewise.
	* testsuite/30_threads/shared_lock/locking/3.cc: Likewise.
	* testsuite/30_threads/shared_lock/locking/4.cc: Likewise.
	* testsuite/30_threads/shared_lock/modifiers/1.cc: Likewise.
	* testsuite/30_threads/shared_lock/modifiers/2.cc: Likewise.
	* testsuite/30_threads/shared_timed_mutex/cons/1.cc: Likewise.
	* testsuite/30_threads/shared_timed_mutex/try_lock/1.cc:
	* testsuite/30_threads/shared_timed_mutex/try_lock/2.cc: Likewise.
	* testsuite/30_threads/thread/native_handle/cancel.cc: Likewise.
	* testsuite/30_threads/timed_mutex/try_lock_until/57641.cc: Likewise.

From-SVN: r210859
2014-05-23 12:49:26 +01:00
Jonathan Wakely d90838f96c 1.cc: Add xfail for dragonfly.
* testsuite/23_containers/vector/capacity/resize/1.cc: Add xfail for
	dragonfly.
	* testsuite/30_threads/call_once/60497.cc: Add target selectors.
	* testsuite/30_threads/condition_variable/members/53841.cc: Likewise.

From-SVN: r210850
2014-05-23 11:19:32 +01:00
Jonathan Wakely 75a8a745af re PR libstdc++/60793 (Add target *-*-dragonfly* to dg-options on 172 libstdc++ tests)
PR libstdc++/60793
	* testsuite/*: Use 's/\*-\*-freebsd\* /&*-*-dragonfly* /' to add
	dragonfly target selector to all tests that run on freebsd.

From-SVN: r210849
2014-05-23 11:19:20 +01:00
François Dumont 95539f21f5 re PR libstdc++/61143 (Arithmetic exception on emplacing into unordered_map moved out)
2014-05-21  François Dumont  <fdumont@gcc.gnu.org>

	PR libstdc++/61143
	* include/bits/hashtable.h: Fix move semantic to leave hashtable in a
	usable state.
	* testsuite/23_containers/unordered_set/61143.cc: New.
	* testsuite/23_containers/unordered_set/modifiers/swap.cc: New.

From-SVN: r210726
2014-05-21 19:51:05 +00:00
Jonathan Wakely 21e2806a8f re PR libstdc++/61269 (<type_traits> includes <cstdint> inside std namespace)
PR libstdc++/61269
	* include/std/type_traits: Move include outside namespace std.
	* testsuite/20_util/declval/requirements/1_neg.cc: Adjust dg-error.
	* testsuite/20_util/make_signed/requirements/typedefs_neg.cc: Likewise.
	* testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc:
	Likewise.

From-SVN: r210715
2014-05-21 16:09:37 +01:00
Cesar Philippidis 6ed9c90a5d testsuite_flags.in (cxxflags): Remove @CXXFLAGS@ since libstdc++.exp imports those flags via getenv.
2014-05-20  Cesar Philippidis  <cesar@codesourcery.com>

	libstdc++-v3/
	* scripts/testsuite_flags.in (cxxflags): Remove @CXXFLAGS@ since 
	libstdc++.exp imports those flags via getenv.
	* testsuite/lib/libstdc++.exp (libstdc++_init): Ensure that 
	CXXFLAGS contains a '-O' flag.

From-SVN: r210659
2014-05-20 17:31:30 -04:00
Sebastian Huber 8ec7c36a53 libffi.exp (load_gcc_lib): Register loaded libs.
2014-05-20  Sebastian Huber  <sebastian.huber@embedded-brains.de>

libffi/
	* testsuite/lib/libffi.exp (load_gcc_lib): Register loaded libs.

libjava/
	* testsuite/lib/libjava.exp (load_gcc_lib): Register loaded libs.

libstdc++-v3/
	* testsuite/lib/libstdc++.exp (load_gcc_lib): Register loaded libs.

From-SVN: r210634
2014-05-20 08:20:06 +00:00