1. 20 Feb, 2020 17 commits
    • i386: Fix *vec_extractv2sf_1 and *vec_extractv2sf_1 shufps alternative [PR93828] · f6088573
      shufps moves two of the four packed single-precision floating-point values
      from *destination* operand (first operand) into the low quadword of the
      destination operand.  Match source operand to the destination.
      
      	PR target/93828
      	* config/i386/mmx.md (*vec_extractv2sf_1): Match source operand
      	to destination operand for shufps alternative.
      	(*vec_extractv2si_1): Ditto.
      
      testsuite/ChangeLog:
      
      	PR target/93828
      	* g++.target/i386/pr93828.C: New test.
      Uros Bizjak committed
    • libstdc++: Fix capturing of lvalue references in_RangeAdaptor::operator() · 6e63438a
      This fixes a dangling-reference issue with views::split and other multi-argument
      adaptors that may take its extra arguments by reference.
      
      When creating the _RangeAdaptorClosure in _RangeAdaptor::operator(), we
      currently capture all provided arguments by value.  When we then use the
      _RangeAdaptorClosure and call it with a range, as in e.g.
      
          v = views::split(p)(range),
      
      we forward the range and the captures to the underlying adaptor routine.  But
      then when the temporary _RangeAdaptorClosure goes out of scope, the by-value
      captures get destroyed and the references to these captures in the resulting view
      become dangling.
      
      This patch fixes this problem by capturing lvalue references by reference in
      _RangeAdaptorClosure::operator(), and then forwarding the captures appropriately
      to the underlying adaptor routine.
      
      libstdc++-v3/ChangeLog:
      
      	* include/std/ranges (views::__adaptor::__maybe_refwrap): New utility
      	function.
      	(views::__adaptor::_RangeAdaptor::operator()): Add comments.  Use
      	__maybe_refwrap to capture lvalue references by reference, and then use
      	unwrap_reference_t to forward the by-reference captures as references.
      	* testsuite/std/ranges/adaptors/split.cc: Augment test.
      	* testsuite/std/ranges/adaptors/split_neg.cc: New test.
      Patrick Palka committed
    • libstdc++: Forward second argument of views::iota using the correct type · 5586e506
      We are forwarding the second argument of views::iota using the wrong type,
      causing compile errors when calling views::iota with a value and bound of
      different types, like in the test case below.
      
      libstdc++-v3/ChangeLog:
      
      	* include/std/ranges (iota_view): Forward declare _Sentinel.
      	(iota_view::_Iterator): Befriend _Sentinel.
      	(iota_view::_Sentinel::_M_equal): New member function.
      	(iota_view::_Sentinel::operator==): Use it.
      	(views::_Iota::operator()): Forward __f using the correct type.
      	* testsuite/std/ranges/access/ssize.cc (test06): Don't call views::iota
      	with integers of different signedness, to appease iota_view's deduction
      	guide.
      	* testsuite/std/ranges/iota/iota_view.cc: Augment test.
      Patrick Palka committed
    • rs6000: Fix infinite loop building ghostscript and icu [PR93658] · e6f24f82
      Previous push didn't get the ChangeLog entries or the actual fix.
      Push those now.
      
      gcc/
      	PR target/93658
      	* config/rs6000/rs6000.c (rs6000_legitimate_address_p): Handle VSX
      	vector modes.
      
      gcc/testsuite/
      	PR target/93658
      	* gcc.target/powerpc/pr93658.c: New test.
      Peter Bergner committed
    • OpenACC's tile clause fix for implicit typing (PR93825) · 2c52b288
      2020-02-20  Tobias Burnus  <tobias@codesourcery.com>
      
      	PR fortran/93825
      	* openmp.c (resolve_oacc_loop_blocks): Move call to
      	resolve_oacc_nested_loops from here ...
      	(resolve_oacc_loop): ... to here.
      
      	PR fortran/93825
      	* gfortran.dg/goacc/tile-3.f90: New.
      Tobias Burnus committed
    • rs6000: Fix infinite loop building ghostscript and icu [PR93658] · b82d4266
      Fix rs6000_legitimate_address_p(), which erroneously marks a valid Altivec
      address as being invalid, which causes LRA's process_address()  to go into
      an infinite loop spilling the same address over and over again.
      
      gcc/
      	PR target/93658
      	* config/rs6000/rs6000.c (rs6000_legitimate_address_p): Handle VSX
      	vector modes.
      
      gcc/testsuite/
      	PR target/93658
      	* gcc.target/powerpc/pr93658.c: New test.
      Peter Bergner committed
    • libstdc++: Issues with range access CPOs (P2091R0) · e817c23f
      This changes how arrays of unknown bound and/or incomplete element type
      are handled.
      
      	* include/bits/range_access.h (ranges::begin): Reject array of
      	incomplete type.
      	(ranges::end, ranges::size): Require arrays to be bounded.
      	(ranges::data): Require lvalue or borrowed_range.
      	(ranges::iterator_t): Remove constraint.
      	* testsuite/std/ranges/access/begin.cc: Do not check array of
      	incomplete type.
      	* testsuite/std/ranges/access/begin_neg.cc: New test.
      	* testsuite/std/ranges/access/end_neg.cc: Adjust expected error.
      	* testsuite/std/ranges/access/size_neg.cc: Adjust expected error.
      	* testsuite/std/ranges/access/ssize.cc: Do not check array of
      	incomplete type.
      Jonathan Wakely committed
    • libstdc++: Define operator<=> for <system_error> types · 4be779f5
      Another piece of P1614R2 for C++20.
      
      This also adds tests for operator< in C++11, which was present but
      untested.
      
      	* include/std/system_error (error_category::operator<=>)
      	(operator<=>(const error_code&, const error_code&))
      	(operator<=>(const error_condition&, const error_condition&)): Define
      	for C++20.
      	* testsuite/19_diagnostics/error_category/operators/less.cc: New test.
      	* testsuite/19_diagnostics/error_category/operators/three_way.cc: New
      	test.
      	* testsuite/19_diagnostics/error_code/operators/equal.cc: Remove
      	incorrect comment.
      	* testsuite/19_diagnostics/error_code/operators/less.cc: New test.
      	* testsuite/19_diagnostics/error_code/operators/not_equal.cc: Remove
      	incorrect comment.
      	* testsuite/19_diagnostics/error_code/operators/three_way.cc: New test.
      	* testsuite/19_diagnostics/error_condition/operators/equal.cc: Remove
      	incorrect comment.
      	* testsuite/19_diagnostics/error_condition/operators/less.cc: New test.
      	* testsuite/19_diagnostics/error_condition/operators/not_equal.cc:
      	Remove incorrect comment.
      	* testsuite/19_diagnostics/error_condition/operators/three_way.cc: New
      	test.
      Jonathan Wakely committed
    • libstdc++: Remove std::type_info::operator!= for C++20 · 20fa41e6
      This function can be synthesized by the compiler now.
      
      	* libsupc++/typeinfo (type_info::operator!=): Remove for C++20.
      Jonathan Wakely committed
    • libstdc++: Add <=> to thread::id · c7b591f3
      	* include/std/thread (thread::id::operator<=>): Define for C++20.
      	* testsuite/30_threads/thread/id/70294.cc: Do not take addresses of
      	functions in namespace std.
      	* testsuite/30_threads/thread/id/operators_c++20.cc: New test.
      Jonathan Wakely committed
    • Remove superfluous word in documentation. · 4a172be3
      	PR translation/93841
      	* config/or1k/or1k.opt: Remove superfluous word.
      	* doc/invoke.texi: Likewise.
      Martin Liska committed
    • Remove triling space for a warning. · 6c39d0b7
      	PR translation/93838
      	* parser.c (cp_parser_decl_specifier_seq): Remove trailing space.
      Martin Liska committed
    • Fix error message for Darwin. · 093bdf2c
      	PR translation/93831
      	* config/darwin.c (darwin_override_options): Change 64b to 64-bit mode.
      Martin Liska committed
    • Remove trailing | in help message. · f40237a3
      	PR translation/93830
      	* common/config/avr/avr-common.c: Remote trailing "|".
      Martin Liska committed
    • Update gcc de.po. · 85232b45
      	* de.po: Update.
      Joseph Myers committed
    • Daily bump. · 549a2400
      GCC Administrator committed
    • c++: Fix wrong-code with non-constexpr constructor [PR93169] · 8f9dd1b0
      In order to detect modifying constant objects in constexpr evaluation,
      which is UB, in r10-2655 I added code that sets TREE_READONLY on
      CONSTRUCTORs of const-qualified objects after they have been fully
      constructed.  But I never made sure that what we're setting the flag
      on actually is a CONSTRUCTOR.  Consequently, as this test case shows,
      we could set TREE_READONLY on a VAR_DECL that in fact wasn't constant,
      causing problems later.  Fixed by setting the flag on CONSTRUCTORs
      only, and only when the evaluation produced something constant.
      
      2020-02-19  Marek Polacek  <polacek@redhat.com>
      
      	PR c++/93169 - wrong-code with a non-constexpr constructor.
      	* constexpr.c (cxx_eval_call_expression): Only set TREE_READONLY
      	on constant CONSTRUCTORs.
      
      	* g++.dg/cpp0x/constexpr-93169.C: New test.
      Marek Polacek committed
  2. 19 Feb, 2020 23 commits