1. 24 Oct, 2019 22 commits
    • [dump] small source cleanup · 84d2160d
      https://gcc.gnu.org/ml/gcc-patches/2019-10/msg01760.html
      	* dumpfile.c (dump_begin): Reorder decls to use RAII.
      
      From-SVN: r277415
      Nathan Sidwell committed
    • Revert ABI changes to std::allocator in C++20 · 75c6a925
      The recent C++20 changes to remove the std::allocator<void> explicit
      specialization and the destructor in the std::allocator primary template
      change the result of some is_trivially_xxx type traits. To avoid those
      changes, this patch restores the explicit specialization and the
      destructor.
      
      In order to meet the C++20 requirements the std::allocator<void>
      explicit specialization must provide the same interface as the primary
      template (except for the unusable allocate and deallocate member
      functions) and the destructor in the primary template must be constexpr.
      
      	* include/bits/allocator.h (allocator<void>): Restore the explicit
      	specialization for C++20, but make its API consistent with the primary
      	template.
      	(allocator::~allocator()): Restore the destructor for C++20, but make
      	it constexpr.
      	* testsuite/20_util/allocator/rebind_c++20.cc: Check allocator<void>.
      	* testsuite/20_util/allocator/requirements/typedefs_c++20.cc: Likewise.
      	* testsuite/20_util/allocator/void.cc: Check that constructors and
      	destructors are trivial. Check for converting constructor in C++20.
      	* testsuite/ext/malloc_allocator/variadic_construct.cc: Simplify
      	dejagnu target selector.
      	* testsuite/ext/new_allocator/variadic_construct.cc: Likewise.
      
      From-SVN: r277410
      Jonathan Wakely committed
    • ipa-sra-19.c: Avoid unprototyped function · bf037872
      Power and IBM Z require a function prototype if a vector argument is
      passed.  Complete the prototype of k to prevent errors from being
      triggered on these platforms
      
      gcc/testsuite/ChangeLog:
      
      2019-10-24  Andreas Krebbel  <krebbel@linux.ibm.com>
      
      	* gcc.dg/ipa/ipa-sra-19.c: Remove dg-skip-if. Add argument type to
      	prototype of k.
      
      From-SVN: r277409
      Andreas Krebbel committed
    • Make gt_pch_nx unreachable in symbol-summary classes. · 315d4248
      2019-10-24  Martin Liska  <mliska@suse.cz>
      
      	* symbol-summary.h (gt_pch_nx): Mark all functions
      	with gcc_unreachable as we do not expect to be called.
      
      From-SVN: r277408
      Martin Liska committed
    • Finish moving constraint and logic functionality of out pt.c. · 79c05c2b
      Also, reimplement and re-enable subsumption caching.
      
      gcc/cp/
      	* config-lang.in (gtfiles): Add logic.cc.
      	* constraint.cc (atomic_constraints_identical_p): Add assertions.
      	(hash_atomic_constraint): Likewise.
      	(constraints_equivalent_p): New.
      	(inchash::add_constraint): New.
      	(iterative_hash_constraint): New.
      	(decl_constraints): Moved from pt.c.
      	(get_constraints): Likewise.
      	(set_constraints): Likewise.
      	(remove_constraints): Likewise.
      	* cp-tree.h (CONSTR_P): New.
      	(init_constraint_processing): Remove.
      	(constraints_equivalent_p, iterative_hash_constraint): Declare.
      	* decl.c (cxx_init_decl_processing): Don't initialize constraints.
      	* logic.cc (subsumption_entry): Moved from pt.c.
      	(subsumption_hasher): Likewise.
      	(subsumption_cache): Likewise.
      	(lookup_subsumption): Likewise.
      	(save_subsumption): Likewise.
      	(subsumes_constraints_nonnull): Use subsumption cache.
      	* pt.c: Move aforementioned declarations out of this file.
      	(init_constraint_processing): Remove.
      
      From-SVN: r277407
      Andrew Sutton committed
    • tree-vect-slp.c (vect_get_and_check_slp_defs): For reduction chains try harder… · 4352288a
      tree-vect-slp.c (vect_get_and_check_slp_defs): For reduction chains try harder with operand swapping and instead of putting a...
      
      2019-10-24  Richard Biener  <rguenther@suse.de>
      
      	* tree-vect-slp.c (vect_get_and_check_slp_defs): For reduction
      	chains try harder with operand swapping and instead of
      	putting a shifted chain into the reduction operands put
      	a repetition of the final reduction op there as if we'd
      	reassociate the expression.
      
      	* gcc.dg/vect/slp-reduc-10a.c: New testcase.
      	* gcc.dg/vect/slp-reduc-10b.c: Likewise.
      	* gcc.dg/vect/slp-reduc-10c.c: Likewise.
      	* gcc.dg/vect/slp-reduc-10d.c: Likewise.
      	* gcc.dg/vect/slp-reduc-10e.c: Likewise.
      
      From-SVN: r277406
      Richard Biener committed
    • Simplify common case of use_future_t that uses std::allocator · 5ce55f3f
      There is no need to store and pass around the allocator object when it's
      an instance of std::allocator. Define a partial specialization of
      std::use_future_t and the corresponding completion token so that no
      allocator is stored. Overload the completion handler constructor to not
      expect an allocator to be stored.
      
      	* include/experimental/executor (__use_future_ct, use_future_t):
      	Define partial specializations for std::allocator.
      	(__use_future_ch): Overload constructor for completion tokens using
      	std::allocator.
      
      From-SVN: r277404
      Jonathan Wakely committed
    • ipa-reference.c (ipa_reference_optimization_summary_d): Rename statics_not_read… · abebffc6
      ipa-reference.c (ipa_reference_optimization_summary_d): Rename statics_not_read and statics_not_written to statics_read and...
      
      
      	* ipa-reference.c (ipa_reference_optimization_summary_d): Rename
      	statics_not_read and statics_not_written to statics_read and
      	statics_written respectively.
      	(no_module_statics): New static var.
      	(ipa_reference_get_not_read_global): Rename to ...
      	(ipa_reference_get_read_global): ... this.
      	(ipa_reference_get_not_written_global): Rename to ...
      	(ipa_reference_get_written_global): ... this.
      	(dump_static_vars_set_to_file): Dump no_module_statics.
      	(copy_static_var_set): Add for propagation parameter.
      	(ipa_init): Initialize no_module_statics.
      	(ipa_ref_opt_summary_t::duplicate): Update.
      	(ipa_ref_opt_summary_t::remove): Update.
      	(propagate): Update.
      	(write_node_summary_p): Look correctly for bitmap differences.
      	(ipa_reference_write_optimization_summary): Update.
      	(ipa_reference_read_optimization_summary): Update.
      	* ipa-reference.h
      	(ipa_reference_get_not_read_global): Rename to ...
      	(ipa_reference_get_read_global): ... this.
      	(ipa_reference_get_not_written_global): Rename to ...
      	(ipa_reference_get_written_global): ... this.
      	* tree-ssa-alias.c (ref_maybe_used_by_call_p_1): Update.
      	(call_may_clobber_ref_p_1): Update.
      
      From-SVN: r277403
      Jan Hubicka committed
    • MSP430: Remove unused msp430_hard_regno_nregs_*_padding functions · 39a6e72a
      2019-10-24  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
      
      	* config/msp430/msp430.c (msp430_hard_regno_nregs_has_padding): Remove
      	and add comment.
      	(msp430_hard_regno_nregs_with_padding): Remove.
      
      From-SVN: r277395
      Jozef Lawrynowicz committed
    • MSP430: Tweaks to generation of 430X instructions · d8e4dc54
      gcc/ChangeLog:
      
      2019-10-24  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
      
      	* config/msp430/constraints.md: Allow post_inc for "Ya" constraint.
      	* config/msp430/msp430.md (430x_shift_left): Use RLAM when the constant
      	shift amount is between 1 and 4.
      	(430x_arithmetic_shift_right): Use RRAM when the constant shift amount
      	is between 1 and 4.
      
      gcc/testsuite/ChangeLog:
      
      2019-10-24  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
      
      	* gcc.target/msp430/emulate-slli.c: Skip for -mcpu=msp430.
      	Add shift by a constant 5 bits.
      	Update scan-assembler directives.
      	* gcc.target/msp430/emulate-srai.c: Likewise.
      	* gcc.target/msp430/emulate-srli.c: Skip for -mcpu=msp430.
      
      From-SVN: r277394
      Jozef Lawrynowicz committed
    • re PR tree-optimization/92205 (ICE in vect_get_vec_def_for_stmt_copy, at… · e2275947
      re PR tree-optimization/92205 (ICE in vect_get_vec_def_for_stmt_copy, at tree-vect-stmts.c:1688 since r277322)
      
      2019-10-24  Richard Biener  <rguenther@suse.de>
      
      	PR tree-optimization/92205
      	* tree-vect-loop.c (vectorizable_reduction): Restrict
      	search for alternate vectype_in to lane-reducing patterns
      	we support.
      
      	* gcc.dg/vect/pr92205.c: New testcase.
      
      From-SVN: r277375
      Richard Biener committed
    • re PR tree-optimization/92203 (ICE in eliminate_stmt, at tree-ssa-sccvn.c:5492) · ee80f0c6
      2019-10-24  Richard Biener  <rguenther@suse.de>
      
      	PR tree-optimization/92203
      	* treee-ssa-sccvn.c (eliminate_dom_walker::eliminate_stmt):
      	Skip eliminating conversion stmts inserted by insertion.
      
      	* gcc.dg/torture/pr92203.c: New testcase.
      
      From-SVN: r277374
      Richard Biener committed
    • re PR tree-optimization/65930 (Reduction with sign-change not handled) · 3574e5df
      2019-10-24  Richard Biener  <rguenther@suse.de>
      
      	PR tree-optimization/65930
      	* gcc.dg/vect/vect-reduc-2short.c: Fix typo.
      
      From-SVN: r277373
      Richard Biener committed
    • re PR tree-optimization/65930 (Reduction with sign-change not handled) · 0caece2c
      2019-10-24  Richard Biener  <rguenther@suse.de>
      
      	PR tree-optimization/65930
      	* gcc.dg/vect/vect-reduc-2char-big-array.c: Adjust again.
      	* gcc.dg/vect/vect-reduc-2char.c: Likewise.
      	* gcc.dg/vect/vect-reduc-2short.c: Likewise.
      	* gcc.dg/vect/vect-reduc-dot-s8b.c: Likewise.
      	* gcc.dg/vect/vect-reduc-pattern-2c.c: Likewise.
      
      From-SVN: r277372
      Richard Biener committed
    • PR libstdc++/88338 Implement P0898R3, C++20 concepts library · 02819d39
      The implementation is already complete but this updates the docs and
      adds tests for the feature test macro.
      
      	* doc/xml/manual/status_cxx2020.xml: Update status.
      	* doc/html/*: Regenerate.
      	* testsuite/std/concepts/1.cc: New test.
      	* testsuite/std/concepts/2.cc: New test.
      
      From-SVN: r277371
      Jonathan Wakely committed
    • Define std::uniform_random_bit_generator concept for C++20 · bbf0495d
      	* include/bits/random.h (uniform_random_bit_generator): Define for
      	C++20.
      	* testsuite/26_numerics/random/concept.cc: New test.
      	* testsuite/26_numerics/random/pr60037-neg.cc: Adjust dg-error line.
      
      From-SVN: r277369
      Jonathan Wakely committed
    • S/390: Use UNSPEC_GET_TP for thread pointer loads · 8f4f98f6
      gcc/ChangeLog:
      
      2019-10-24  Ilya Leoshkevich  <iii@linux.ibm.com>
      
      	* config/s390/s390.c (s390_get_thread_pointer): Use
      	gen_get_thread_pointer.
      	(s390_expand_split_stack_prologue): Likewise.
      	* config/s390/s390.md (UNSPEC_GET_TP): New UNSPEC.
      	(*get_tp_31): New 31-bit splitter for UNSPEC_GET_TP.
      	(*get_tp_64): New 64-bit splitter for UNSPEC_GET_TP.
      	(get_thread_pointer<mode>): Use UNSPEC_GET_TP, use
      	parameterized name.
      
      gcc/testsuite/ChangeLog:
      
      2019-10-24  Ilya Leoshkevich  <iii@linux.ibm.com>
      
      	* gcc.target/s390/load-thread-pointer-once-2.c: New test.
      
      From-SVN: r277368
      Ilya Leoshkevich committed
    • Fix another UBSAN in Fortran coarray. · d136595d
      2019-10-24  Martin Liska  <mliska@suse.cz>
      
      	PR fortran/92174
      	* array.c (gfc_resolve_array_spec): Break the loop
      	for out of bounds index.
      	* resolve.c (is_non_constant_shape_array): Likewise.
      
      From-SVN: r277367
      Martin Liska committed
    • tree-vect-slp.c (vect_analyze_slp): When reduction group SLP discovery fails try… · 0214d31a
      tree-vect-slp.c (vect_analyze_slp): When reduction group SLP discovery fails try to handle the reduction as part of...
      
      2019-10-24  Richard Biener  <rguenther@suse.de>
      
      	* tree-vect-slp.c (vect_analyze_slp): When reduction group
      	SLP discovery fails try to handle the reduction as part
      	of SLP reduction discovery.
      
      	* gcc.dg/vect/slp-reduc-9.c: New testcase.
      
      From-SVN: r277366
      Richard Biener committed
    • [C++ PATCH] 'std' identifier not needed · 5a7c4505
      https://gcc.gnu.org/ml/gcc-patches/2019-10/msg01707.html
      	* cp-tree.c (CPTI_STD_IDENTIFIER): Delete.
      	(std_identifier): Delete.
      	(DECL_NAME_SPACE_STD_P): Compare against std_node.
      	* decl.c (initialize_predefined_identifiers): 'std' is not needed.
      	(cxx_init_decl_processing): Adjust creation of ::std.  Use
      	{push,pop}_nested_namespace.
      	(cxx_builtin_function): Use {push,pop}_nested_namespace.
      	* except.c (init_exception_processing): Likewise.
      	* rtti.c (init_rtti_processing): Likewise.
      
      From-SVN: r277365
      Nathan Sidwell committed
    • pr70010.c: Add -Wno-psabi. · 61d5466b
              * gcc.target/powerpc/pr70010.c: Add -Wno-psabi.
              * gcc.target/powerpc/pr70010-[12].c: Require LTO.
              * gcc.target/powerpc/pr91275.c: Add -mcpu=power8.
      
      From-SVN: r277363
      David Edelsohn committed
    • Daily bump. · 15e0f086
      From-SVN: r277362
      GCC Administrator committed
  2. 23 Oct, 2019 18 commits
    • 2019-10-23 Steven G. Kargl <kargl@gcc.gnu.org> · e288c49d
      	dump-parse-tree.c (show_expr): Add dumping of BT_BOZ constants.
      
      From-SVN: r277358
      Steven G. Kargl committed
    • Rework how prefixed instruction length is calculated. · ca06b86c
      2019-10-23  Michael Meissner  <meissner@linux.ibm.com>
      
      	* config/rs6000/rs6000-protos.h (rs6000_adjust_insn_length): New
      	declaration.
      	* config/rs6000/rs6000.c (rs6000_insn_cost): Use num_insns insn
      	attribute if it exists, rather than the insn size.  If we use the
      	insn size, adjust the size to remove the extra size that prefixed
      	instructions take.
      	(rs6000_adjust_insn_length): New function.
      	* config/rs6000/rs6000.h (ADJUST_INSN_LENGTH): New target hook to
      	update the instruction sized if prefixed instructions are used.
      	* config/rs6000/rs6000.md (prefixed_length attribute): Delete.
      	(non_prefixed_length attribute): Delete.
      	(num_insns attribute): New insn attribute to return the number of
      	instructions.
      	(max_prefixed_insns attribute): New insn attribute to return the
      	maximum number of prefixed instructions in an insn.
      	(length attribute): Do not adjust for prefix instructions here,
      	punt to ADJUST_INSN_LENGTH.
      	(mov<mode>_64bit): Set max_prefixed_insns and num_insns.
      	(movtd_64bit_nodm): Set max_prefixed_insns and num_insns.
      	(mov<mode>_ppc64): Set max_prefixed_insns and num_insns.
      	* config/rs6000/vsx.md: (vsx_mov<mode>_64bit): Set
      	max_prefixed_insns and num_insns.
      
      From-SVN: r277352
      Michael Meissner committed
    • Implement P1286R2, Contra CWG1778 · 0998d2fd
      The C++11 requirement that an explicit exception-specification on a
      defaulted function match the implicit one was found to be problematic for
      std::atomic.  This paper, adopted in February, simply removes that
      requirement: if an explicitly defaulted function has a different
      exception-specification, that now works just like a user-written function:
      either it isn't noexcept when it could be, or it is noexcept and will call
      terminate if an exception is thrown.
      
      	* method.c (defaulted_late_check): Don't check explicit
      	exception-specification on defaulted function.
      	(after_nsdmi_defaulted_late_checks): Remove.
      	* parser.h (struct cp_unparsed_functions_entry): Remove classes.
      	* parser.c (unparsed_classes): Remove.
      	(push_unparsed_function_queues, cp_parser_class_specifier_1):
      	Adjust.
      
      From-SVN: r277351
      Jason Merrill committed
    • Reformat some code; Add support for generating PLWA with offsets whose bottom 2 bits are non-zero. · cbb28ef1
      2019-10-23  Michael Meissner  <meissner@linux.ibm.com>
      
      	* config/rs6000/rs6000.md (mov<mode>_64bit_dm): Reformat.
      	(movtd_64bit_nodm): Reformat.
      	(mov<mode>_32bit): Reformat.
      	(mov<mode>_softfloat): Reformat.
      	(FMOVE128_GPR splitter): Reformat.
      	(DIFD splitter): Reformat.
      	(TI2 splitter): Reformat.
      	* config/rs6000/predicates.md (lwa_operand): If the bottom two
      	bits of the offset for the memory address are non-zero, use PLWA
      	if prefixed instructions are available.
      
      From-SVN: r277349
      Michael Meissner committed
    • lto-streamer-out.c (cmp_symbol_files): Watch for overflow. · 7c1bc95a
      
      	* lto-streamer-out.c (cmp_symbol_files): Watch for overflow.
      
      From-SVN: r277348
      Jan Hubicka committed
    • ipa-reference.c (varpool_removal_hook, [...]): Fix previous patch. · 45012be1
      	* ipa-reference.c (varpool_removal_hook, ipa_reference_c_finalize): Fix
      	previous patch.
      
      From-SVN: r277347
      Jan Hubicka committed
    • lto-streamer-out.c (output_constructor): Push CTORS_OUT timevar. · ebad2eee
      	* lto-streamer-out.c (output_constructor): Push CTORS_OUT timevar.
      	(cmp_symbol_files): New.
      	(lto_output): Copy sections in file order.
      	* lto-streamer.h (lto_file_decl_data): Add field order.
      	* lto-common.c (lto_file_finalize): Add order attribute.
      	(lto_create_files_from_ids): Pass order.
      	(lto_file_read): UPdate call of lto_create_files_from_ids.
      
      From-SVN: r277346
      Jan Hubicka committed
    • ipa-reference.h (ipa_reference_var_uid): Move offline. · b5b6485f
      	* ipa-reference.h (ipa_reference_var_uid): Move offline.
      	* ipa-reference.c (reference_vars_map_t): new type.
      	(ipa_reference_vars_map, ipa_reference_vars_uids): New static vars.
      	(ipa_reference_var_uid): Implement.
      	(varpool_node_hooks): New static var.
      	(varpool_removal_hook): New function.
      	(is_improper): Do not check bitmap for id==-1
      	(get_static_name): Update.
      	(ipa_init): Initialize new datastructures.
      	(analyze_function): Do not recompute ids.
      	(propagate): Free reference_vars_to_consider.
      	(stream_out_bitmap): Update.
      	(ipa_reference_read_optimization_summary): Update.
      
      From-SVN: r277345
      Jan Hubicka committed
    • re PR gcov-profile/91971 (Profile directory concatenated with object file path) · 9fdaaf77
      2019-10-23  qing zhao  <qing.zhao@oracle.com>
      
      	PR gcov-profile/91971
      	* coverage.c (coverage_init): Mangle the full path of filename when
      	filename is a absolute path.
      
      From-SVN: r277344
      Qing Zhao committed
    • Make std::invoke usable in constant expressions · 6d188e4f
      	* include/std/functional (invoke): Add constexpr for C++20.
      	* include/std/version (__cpp_lib_constexpr_invoke): Define.
      	* testsuite/20_util/function_objects/invoke/constexpr.cc: New test.
      
      From-SVN: r277343
      Jonathan Wakely committed
    • PR c++/91369 Implement P0784R7 changes to allocation and construction · 85f24114
      This patch is the first part of library support for constexpr
      std::vector and std::string. This only includes the changes to
      std::allocator, std::allocator_traits, std::construct_at,
      std::destroy_at, std::destroy and std::destroy_n.
      
      std::allocator::allocate and std::allocator::deallocate need to be
      added so that they can be intercepted by the compiler during constant
      evaluation. Outside of constant evaluation those new member functions
      just forward to the existing implementation in the base class.
      
      	PR c++/91369 Implement P0784R7 changes to allocation and construction
      	* include/bits/alloc_traits.h: Include <bits/stl_construct.h>.
      	(allocator_traits::_S_allocate, allocator_traits::_S_construct)
      	(allocator_traits::_S_destroy, allocator_traits::_S_max_size)
      	(allocator_traits::_S_select, allocator_traits::allocate)
      	(allocator_traits::deallocate, allocator_traits::construct)
      	(allocator_traits::destroy, allocator_traits::max_size)
      	(allocator_traits::select_on_container_copy_construction)
      	(allocator_traits<allocator<T>>): Add constexpr specifier for C++20.
      	(allocator_traits<allocator<T>>::construct): Use construct_at.
      	(allocator_traits<allocator<T>>::destroy): Use destroy_at.
      	(__alloc_on_copy, __alloc_on_move, __alloc_on_swap): Add constexpr
      	specifier.
      	(_Destroy(ForwardIterator, ForwardIterator, Alloc&))
      	(_Destroy(ForwardIterator, ForwardIterator, allocator<T>&)): Move here
      	from <bits/stl_construct.h>.
      	* include/bits/allocator.h (allocator::~allocator): Remove for C++20.
      	(allocator::allocate, allocate::deallocate): Define for C++20 and up.
      	(operator==, operator!=): Add constexpr specifier for C++20.
      	* include/bits/stl_construct.h: Don't include <ext/alloc_traits.h>.
      	(destroy_at): For C++20 add constexpr specifier and support for
      	destroying arrays.
      	(construct_at): Define new function for C++20.
      	(_Construct): Return result of placement new-expression. For C++11 and
      	up add constexpr. For C++20 dispatch to std::construct_at during
      	constant evaluation.
      	(_Destroy(pointer)): Add constexpr specifier. For C++20 dispatch to
      	std::destroy_at during constant evaluation.
      	(_Destroy_aux::__destroy, _Destroy_n_aux::__destroy_n): Add constexpr
      	specifier for C++20.
      	(_Destroy(ForwardIterator, ForwardIterator))
      	(_Destroy(ForwardIterator, Size)): Likewise. Do not elide trivial
      	destructors during constant evaluation.
      	(destroy, destroy_n): Add constexpr specifier for C++20.
      	(_Destroy(ForwardIterator, ForwardIterator, Alloc&))
      	(_Destroy(ForwardIterator, ForwardIterator, allocator<T>&)): Move to
      	<bits/alloc_traits.h>, to remove dependency on allocators.
      	* include/bits/stl_uninitialized.h: Include <ext/alloc_traits.h>.
      	Include <bits/stl_pair.h> instead of <utility>.
      	* include/ext/alloc_traits.h: Always include <bits/alloc_traits.h>.
      	(__alloc_traits::construct, __alloc_traits::destroy)
      	(__alloc_traits::_S_select_on_copy, __alloc_traits::_S_on_swap): Add
      	constexpr specifier.
      	* include/ext/malloc_allocator.h  (operator==, operator!=): Add
      	constexpr specifier for C++20.
      	* include/ext/new_allocator.h (operator==, operator!=): Likewise.
      	* testsuite/20_util/headers/memory/synopsis.cc: Add constexpr.
      	* testsuite/20_util/scoped_allocator/69293_neg.cc: Ignore additional
      	errors due to constexpr function called after failed static_assert.
      	* testsuite/20_util/specialized_algorithms/construct_at/1.cc: New test.
      	* testsuite/23_containers/vector/cons/destructible_debug_neg.cc:
      	Ignore additional errors due to constexpr function called after failed
      	static_assert.
      	* testsuite/23_containers/vector/cons/destructible_neg.cc: Likewise.
      
      From-SVN: r277342
      Jonathan Wakely committed
    • msp430-protos.h (msp430_has_hwmult): New. · 0744333e
      2019-10-23  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
      
      	* config/msp430/msp430-protos.h (msp430_has_hwmult): New.
      	* config/msp430/msp430.c (msp430_no_hwmult): Remove.
      	(msp430_has_hwmult): New.
      	(msp430_output_labelref):
      	s/msp430_hwmult_type != MSP430_HWMULT_NONE/msp430_has_hwmult ()/
      	* config/msp430/msp430.md (mulhisi3): Likewise.
      	(umulhisi3): Likewise.
      	(mulsidi3): Likewise.
      	(umulsidi3): Likewise.
      
      From-SVN: r277341
      Jozef Lawrynowicz committed
    • lib2hw_mul.S: Fix wrong syntax in branch instruction. · 91c64455
      2019-10-23  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
      
      	* config/msp430/lib2hw_mul.S: Fix wrong syntax in branch instruction.
      	s/RESULT_LO/RESLO, s/RESULT_HI/RESHI, s/MPY_OP1/MPY, 
      	s/MPY_OP1_S/MPYS, s/MAC_OP1/MAC, s/MPY_OP2/OP2, s/MAC_OP2/OP2.
      	Define symbols for 32-bit and f5series hardware multiply
      	register addresses.
      	Replace hard-coded register addresses with symbols.
      	Fix "_mspabi*" typo.
      	Fix whitespace.
      	* config/msp430/lib2mul.c: Add comment.
      
      From-SVN: r277340
      Jozef Lawrynowicz committed
    • Replace C++14 feature used in C++11 test · 161c3bf9
      	* testsuite/20_util/bind/91371.cc: Fix test to compile as C++11.
      
      From-SVN: r277339
      Jonathan Wakely committed
    • Only qualify function as constexpr for C++14 and later · 30a761c4
      This helper function is not a valid constexpr function in C++11, so
      should only be marked constexpr for C++14 and later.
      
      	* include/debug/helper_functions.h (__valid_range): Change
      	_GLIBCXX_CONSTEXPR to _GLIBCXX14_CONSTEXPR.
      
      From-SVN: r277338
      Jonathan Wakely committed
    • Qualify type names in <ext/throw_allocator.h> · 84a2f4b3
      	* include/ext/throw_allocator.h (throw_allocator_base): Qualify
      	size_t and ptrdiff_t.
      
      From-SVN: r277337
      Jonathan Wakely committed
    • Adjust pb_ds extensions to use allocator_traits · ec541f1b
      These changes are largely useless, because most of them are simply
      allowing 'reference' and 'const_reference' types to be obtained from an
      allocator, and since C++11 allocators don't define reference types (they
      just use plain lvalue references. Pretending to support C++98 allocators
      with user-defined reference types is a waste of time (especially as
      several of the pb_ds types appear to use a static allocator object which
      means stateful allocators are not supported).
      
      	* include/ext/pb_ds/detail/bin_search_tree_/bin_search_tree_.hpp:
      	Use detail::rebind_traits.
      	* include/ext/pb_ds/detail/bin_search_tree_/node_iterators.hpp:
      	Likewise.
      	* include/ext/pb_ds/detail/bin_search_tree_/traits.hpp: Likewise.
      	* include/ext/pb_ds/detail/binary_heap_/binary_heap_.hpp: Likewise.
      	* include/ext/pb_ds/detail/binary_heap_/entry_cmp.hpp: Likewise.
      	* include/ext/pb_ds/detail/binary_heap_/entry_pred.hpp: Likewise.
      	* include/ext/pb_ds/detail/binary_heap_/point_const_iterator.hpp:
      	Likewise.
      	* include/ext/pb_ds/detail/binomial_heap_base_/binomial_heap_base_.hpp:
      	Likewise.
      	* include/ext/pb_ds/detail/branch_policy/branch_policy.hpp: Likewise.
      	* include/ext/pb_ds/detail/cc_hash_table_map_/cc_ht_map_.hpp: Likewise.
      	* include/ext/pb_ds/detail/cond_dealtor.hpp: Likewise.
      	* include/ext/pb_ds/detail/eq_fn/hash_eq_fn.hpp (has_eq_fn): Likewise.
      	* include/ext/pb_ds/detail/gp_hash_table_map_/gp_ht_map_.hpp: Likewise.
      	* include/ext/pb_ds/detail/hash_fn/ranged_hash_fn.hpp: Likewise.
      	* include/ext/pb_ds/detail/hash_fn/ranged_probe_fn.hpp: Likewise.
      	* include/ext/pb_ds/detail/left_child_next_sibling_heap_/
      	left_child_next_sibling_heap_.hpp: Likewise.
      	* include/ext/pb_ds/detail/left_child_next_sibling_heap_/node.hpp:
      	Likewise.
      	* include/ext/pb_ds/detail/left_child_next_sibling_heap_/
      	point_const_iterator.hpp: Likewise.
      	* include/ext/pb_ds/detail/list_update_map_/lu_map_.hpp: Likewise.
      	* include/ext/pb_ds/detail/ov_tree_map_/
      	constructors_destructor_fn_imps.hpp: Likewise.
      	* include/ext/pb_ds/detail/ov_tree_map_/node_iterators.hpp: Likewise.
      	* include/ext/pb_ds/detail/ov_tree_map_/ov_tree_map_.hpp: Likewise.
      	* include/ext/pb_ds/detail/pairing_heap_/pairing_heap_.hpp: Likewise.
      	* include/ext/pb_ds/detail/pat_trie_/pat_trie_.hpp: Likewise.
      	* include/ext/pb_ds/detail/pat_trie_/pat_trie_base.hpp: Likewise.
      	* include/ext/pb_ds/detail/rb_tree_map_/node.hpp: Likewise.
      	* include/ext/pb_ds/detail/rc_binomial_heap_/rc.hpp: Likewise.
      	* include/ext/pb_ds/detail/splay_tree_/node.hpp: Likewise.
      	* include/ext/pb_ds/detail/thin_heap_/thin_heap_.hpp: Likewise.
      	* include/ext/pb_ds/detail/trie_policy/sample_trie_access_traits.hpp:
      	Likewise.
      	* include/ext/pb_ds/detail/type_utils.hpp: Fix typo in comment.
      	* include/ext/pb_ds/detail/types_traits.hpp (stored_value): Add
      	bool parameter to control whether the hash value is stored.
      	(select_base_type): New class template and partial specialization.
      	(maybe_null_type): Likewise.
      	(rebind_traits): New class template.
      	(type_base): Remove four nearly identical specializations.
      	(type_dispatch): Remove.
      	(type_traits): Use select_base_type and maybe_null_type instead of
      	type_base to control differences between specializations.
      	* include/ext/pb_ds/list_update_policy.hpp: Use detail::rebind_traits.
      	* include/ext/pb_ds/priority_queue.hpp: Likewise.
      	* include/ext/pb_ds/tree_policy.hpp: Likewise.
      	* include/ext/pb_ds/trie_policy.hpp: Likewise.
      
      From-SVN: r277336
      Jonathan Wakely committed
    • Adjust extension types to use allocator_traits · 603aec67
      This makes these extensions work with types meeting the Cpp17Allocator
      requirements as well as the C++98 Allocator requirements.
      
      	* include/backward/hash_set (hash_set): Use __alloc_traits.
      	* include/backward/hashtable.h (_Hashtable): Likewise.
      	* include/ext/alloc_traits.h (__alloc_traits::allocate): Add overload
      	taking a hint.
      	* include/ext/extptr_allocator.h (_ExtPtr_allocator::allocate): Ignore
      	hint.
      	* include/ext/slist (_Slist_base): Use __alloc_traits.
      	* include/tr1/hashtable.h (_Hashtable): Likewise.
      	* include/tr1/regex (match_results): Use vector::const_reference
      	instead of assuming the allocator defines it.
      	* testsuite/backward/hash_map/23528.cc: Use allocator_traits in C++11.
      	* testsuite/tr1/6_containers/unordered_map/capacity/29134-map.cc: Use
      	__gnu_test::max_size.
      	* testsuite/tr1/6_containers/unordered_multimap/capacity/
      	29134-multimap.cc: Likewise.
      	* testsuite/tr1/6_containers/unordered_multiset/capacity/
      	29134-multiset.cc: Likewise.
      	* testsuite/tr1/6_containers/unordered_set/capacity/29134-set.cc:
      	Likewise.
      
      From-SVN: r277335
      Jonathan Wakely committed