1. 08 Mar, 2019 4 commits
    • re PR libstdc++/89608 (Undetected iterator invalidations on unordered containers in debug mode) · 20a4550c
      2019-03-08  François Dumont  <fdumont@gcc.gnu.org>
      
      	PR libstdc++/89608
      	* include/debug/unordered_map (unordered_map<>::_M_check_rehashed):
      	Invalidate all iterators in case of rehash.
      	(unordered_multimap<>::_M_check_rehashed): Likewise.
      	* include/debug/unordered_set
      	(unordered_set<>::_M_check_rehashed): Likewise.
      	(unordered_multiset<>::_M_check_rehashed): Likewise.
      	* testsuite/23_containers/unordered_set/debug/89608_neg.cc: New.
      
      From-SVN: r269478
      François Dumont committed
    • PR c++/88123 - lambda and using-directive. · bddee796
      For named function calls in a template, the result of unqualified lookup is
      safed in CALL_EXPR_FN.  But for operator expressions, no unqualified lookup
      is performed until we know whether the operands have class type.  So when we
      see in a lambda a use of an operator that might be overloaded, we need to do
      that lookup then and save it away somewhere.  One possibility would be in
      the expression, but we can't really add extra conditional operands to
      standard tree codes.  I mostly implemented another approach using a new
      WITH_LOOKUP_EXPR code, but teaching everywhere how to handle a new tree code
      is always complicated.  Then it occurred to me that we could associate the
      lookups with the function, which is both simpler and smaller.  So this patch
      stores any operator bindings needed by a lambda function in an internal
      attribute on the lambda call operator.
      
      	* name-lookup.c (op_unqualified_lookup)
      	(maybe_save_operator_binding, discard_operator_bindings)
      	(push_operator_bindings): New.
      	* typeck.c (build_x_binary_op, build_x_unary_op): Call
      	maybe_save_operator_binding.
      	* decl.c (start_preparsed_function): Call push_operator_bindings.
      	* tree.c (cp_free_lang_data): Call discard_operator_bindings.
      
      From-SVN: r269477
      Jason Merrill committed
    • Daily bump. · 1ce59b6c
      From-SVN: r269476
      GCC Administrator committed
    • * sv.po: Update. · 479d3a60
      From-SVN: r269473
      Joseph Myers committed
  2. 07 Mar, 2019 22 commits
  3. 06 Mar, 2019 14 commits
    • re PR fortran/71203 (ICE in add_init_expr_to_sym, at fortran/decl.c:1512 and :1564) · a28a8193
      2019-03-06  Harald Anlauf  <anlauf@gmx.de>
      
      	PR fortran/71203
      	* expr.c (simplify_const_ref): Avoid null pointer dereference.
      
      	PR fortran/71203
      	* gfortran.dg/substr_8.f90: New test.
      
      From-SVN: r269444
      Harald Anlauf committed
    • compiler: emit underlying constant in array_type length export · 1c98301f
          
          In Array_type::do_export, when emitting a concrete array length,
          evaluate the length expression to an integer constant and emit that
          constant, instead of calling the more general method for emitting
          expressions. This is to avoid the possibility that we will need
          to emit a conversion, which could confuse the gccgoimporter.
          
          Fixes golang/go#30628.
          
          Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/165741
      
      From-SVN: r269443
      Ian Lance Taylor committed
    • PR c++/89381 - implicit copy and using-declaration. · 2de5d0ea
      Here the used base<int>::operator= gets into the list of foo's bindings for
      operator=, but it shouldn't make the copy ctor deleted.
      
      	* class.c (classtype_has_move_assign_or_move_ctor_p): Don't consider
      	op= brought in by a using-declaration.
      
      From-SVN: r269442
      Jason Merrill committed
    • re PR c++/87148 (backward compatibility issue to take char [] as incomplete type) · 71b6cb2b
      	PR c++/87148
      	* init.c (build_value_init_noctor): Ignore flexible array members.
      
      	* g++.dg/ext/flexary34.C: New test.
      
      From-SVN: r269434
      Jakub Jelinek committed
    • PR c++/89576 - if constexpr of lambda capture. · 4556c5b3
      Now that we're doing implicit lambda capture in templates, we see x here as
      the lambda capture.  maybe_convert_cond was doing nothing in a template, so
      we never called mark_rvalue_use on x.  As part of the broad move toward
      doing more processing of non-dependent expressions, let's do this
      conversion.
      
      	* semantics.c (maybe_convert_cond): Do convert a non-dependent
      	condition in a template.
      	* typeck.c (condition_conversion): Handle being called in a
      	template.
      
      From-SVN: r269433
      Jason Merrill committed
    • encoding.c (DFmode): #undef before #define. · d135eeb2
      	* encoding.c (DFmode): #undef before #define.
      
      From-SVN: r269429
      Uros Bizjak committed
    • re PR rtl-optimization/88845 (ICE in lra_set_insn_recog_data, at lra.c:1010) · 2713e5db
      gcc/
      	PR rtl-optimization/88845
      	* config/rs6000/rs6000.c (rs6000_emit_move_si_sf_subreg): Enable during
      	LRA.
      	* lra.c (remove_scratches_1): New function.
      	(remove_scratches): Use it.
      	(lra_emit_move): Likewise.
      
      gcc/testsuite/
      	PR rtl-optimization/88845
      	* gcc.target/powerpc/pr88845.c: New test.
      
      From-SVN: r269428
      Peter Bergner committed
    • PR c++/87378 - bogus -Wredundant-move warning. · ec2de569
      	* typeck.c (maybe_warn_pessimizing_move): See if the maybe-rvalue
      	overload resolution would actually succeed.
      
      	* g++.dg/cpp0x/Wredundant-move1.C (fn4): Drop dg-warning.
      	* g++.dg/cpp0x/Wredundant-move7.C: New test.
      
      From-SVN: r269427
      Marek Polacek committed
    • Add feature test macro for bounded array traits · 46610940
      	* include/std/type_traits (__cpp_lib_bounded_array_traits): Define.
      	* include/std/version (__cpp_lib_bounded_array_traits): Likewise.
      	* testsuite/20_util/is_bounded_array/value.cc: Check for macro.
      	* testsuite/20_util/is_unbounded_array/value.cc: Likewise.
      
      From-SVN: r269426
      Jonathan Wakely committed
    • PR libstdc++/86655 - std::assoc_legendre should not constrain · f29a1ef2
      2019-03-06  Edward Smith-Rowland  <3dw4rd@verizon.net>
      
      	PR libstdc++/86655 - std::assoc_legendre should not constrain
      	the value of m (or x).
      	* include/tr1/legendre_function.tcc (__assoc_legendre_p,
      	__sph_legendre): If degree > order Don't throw, return 0.
      	(__legendre_p, __assoc_legendre_p): Don't constrain x either.
      	* testsuite/special_functions/02_assoc_legendre/pr86655.cc: New test.
      	* testsuite/special_functions/20_sph_legendre/pr86655.cc: New test.
      	* testsuite/tr1/5_numerical_facilities/special_functions/
      	02_assoc_legendre/pr86655.cc: New test.
      	* testsuite/tr1/5_numerical_facilities/special_functions/
      	22_sph_legendre/pr86655.cc: New test.
      
      From-SVN: r269423
      Edward Smith-Rowland committed
    • Rewrite variant, also PR libstdc++/85517 · 669a6fdc
      * include/std/variant (__do_visit): New.
      (__variant_cast): Likewise.
      (__variant_cookie): Likewise.
      (__erased_*): Remove.
      (_Variant_storage::_S_vtable): Likewise.
      (_Variant_storage::__M_reset_impl): Adjust to use __do_visit.
      (_Variant_storage::__M_reset): Adjust.
      (__variant_construct): New.
      (_Copy_ctor_base(const _Copy_ctor_base&)): Adjust to use
      __variant_construct.
      (_Move_ctor_base(_Move_ctor_base&&)): Likewise.
      (_Move_ctor_base::__M_destructive_copy): New.
      (_Move_ctor_base::__M_destructive_move): Adjust to use
      __variant_construct.
      (_Copy_assign_base::operator=): Adjust to use __do_visit.
      (_Copy_assign_alias): Adjust to check both copy assignment
      and copy construction for triviality.
      (_Move_assign_base::operator=): Adjust to use __do_visit.
      (_Multi_array): Add support for visitors that accept and return
      a __variant_cookie.
      (__gen_vtable_impl::_S_apply_all_alts): Likewise.
      (__gen_vtable_impl::_S_apply_single_alt): Likewise.
      (__gen_vtable_impl::__element_by_index_or_cookie): New. Generate
      a __variant_cookie temporary for a variant that is valueless and..
      (__gen_vtable_impl::__visit_invoke): ..adjust here.
      (__gen_vtable::_Array_type): Conditionally make space for
      the __variant_cookie visitor case.
      (__variant_construct_by_index): New.
      (get_if): Adjust to use std::addressof.
      (relops): Adjust to use __do_visit.
      (variant): Add __variant_cast and __variant_construct_by_index
      as friends.
      (variant::emplace): Use _M_reset() and __variant_construct_by_index
      instead of self-destruction.
      (variant::swap): Adjust to use __do_visit.
      (visit): Reimplement in terms of __do_visit.
      (__variant_hash_call_base_impl::operator()): Adjust to use __do_visit.
      * testsuite/20_util/variant/compile.cc: Adjust.
      * testsuite/20_util/variant/run.cc: Likewise.
      
      From-SVN: r269422
      Ville Voutilainen committed
    • Add L suffix to __cpp_lib_char8_t value · 99447f70
      	* include/bits/c++config.h (_cpp_lib_char8_t): Add L suffix to
      	constant.
      	* testsuite/experimental/feat-char8_t.cc: Likewise.
      
      From-SVN: r269421
      Jonathan Wakely committed
    • Add C++20 Traits for [Un]bounded Arrays (P1357R1) · 28d85efb
      	 * include/std/type_traits [C++20] (is_bounded_array)
      	 (is_unbounded_array, is_bounded_array_v, is_unbounded_array_v):
      	 Define.
      	 * testsuite/20_util/is_bounded_array/requirements/
      	 explicit_instantiation.cc: New test.
      	 * testsuite/20_util/is_bounded_array/requirements/typedefs.cc: New
      	 test.
      	 * testsuite/20_util/is_bounded_array/value.cc: New test.
      	 * testsuite/20_util/is_unbounded_array/requirements/
      	 explicit_instantiation.cc: New test.
      	 * testsuite/20_util/is_unbounded_array/requirements/typedefs.cc: New
      	 * test.
      	 * testsuite/20_util/is_unbounded_array/value.cc: New test.
      
      From-SVN: r269420
      Jonathan Wakely committed